I am writing a comparative financial statement comparing this year to last year this month to last years month. I need to write a formula that will pull this month for last year's data. The table/fields in my database are:
GLPerBal.FiscalPeriod = data is an integer, ie 1 = Jan, 2 = Feb etc
GLPerBal.FiscalYear = data is also an integer, 2,007 = 2007 etc
I have 2 parameters set up, {? Month}, {? Year}, to select the month and year.
This is the best I can come up with so far, and it doesn't work:
if {GLPerBal.FiscalYear} = ({? Year}-1)
and {GLPerBal.FiscalPeriod} = {? Month} then
{GLPerBal.CreditAmt} + {GLPerBal.DebitAmt}
I know this is a little complicated, but there are alot of experienced users on this site. Any help would be appreciated.
Thanks.