2 Replies Latest reply: Aug 29, 2011 7:08 AM by justintremblett

# Comparable period in previous fiscal year, using variable for period

Hi,

I'm having some trouble combining 2 expressions in order to give me data from a select period in our previous fiscal year. The first expression returns data from our previous fiscal year (in 2009-2010 format):

=Sum({\$<[Fiscal Year]={"\$(=Only((SubField([Fiscal Year],'-',1) - 1) & '-' & (SubField([Fiscal Year],'-',2) - 1) ))"}>} [Equivalent Units] )

The second expression forces a select period based on a variable called PVar, which is a period 1-12:

=Sum({\$<[Period]={\$(PVar)}>} [Equivalent Units])

Both expressions work seperately. Does someone know how I might combine them to return the data for the select Period of the previous Fiscal Year?

Thanks

• ###### Comparable period in previous fiscal year, using variable for period

Hi,

try adding the [Period]={\$(PVar)} in the first expression:

Sum({\$<[Fiscal Year]={"\$(=Only((SubField([Fiscal Year],'-',1) - 1) & '-' & (SubField([Fiscal Year],'-',2) - 1) ))"},

[Period]={\$(PVar)}>} [Equivalent Units] )

Hope this helps

Regards!

• ###### Comparable period in previous fiscal year, using variable for period

Thanks Gabriela,

I had been attempting to add the two together but couldnt understand which brackets to leave in, and which to remove. This works perfectly.Thanks again.