5 Replies Latest reply: Apr 12, 2010 6:17 AM by Darius Pranskus

# Set Analysis Syntax

In my fiscal calendar table, I have a column called QtrIndex that sequentially numbers each fiscal quarter. In my expression, I would like to evaluate both current quarter and prior quarter's sales to get the overall change. However, I'm having trouble writing the expression to sum the previous quarter's sales. Can someone help with the correct expression. This didn't work and I'm not sure why:

sum({\$<QtrIndex = {\$(QtrIndex-1)} >} POSAmt)

• ###### Set Analysis Syntax

Hi,

Try like this

sum({\$<QtrIndex = {\$(QtrIndex)-1} >} POSAmt).

Regards,

Ajay

• ###### Set Analysis Syntax

That gave me a syntax error. I tried the following, and it didn't work either:

Sum({\$<QtrIndex={\$(=QtrIndex-1)}>}POSAmt)

• ###### Set Analysis Syntax

Hi,

Try using below formulae.

=sum({<QtrIndex= {\$(=Max(QtrIndex)-1)}>} POSAmt)

- Sridhar

• ###### Set Analysis Syntax

Sorry, but this formula will only work for the most current Quarter. I'm performing the calculation for all quarters to get the change in growth, as follows: (ThisQuarterSales / PriorQuarterSales) - 1. So, I cannot use a max function here.

• ###### Set Analysis Syntax

I think it will work for the Quarter which is selected, in Case there are no selections in calendar table it will return most current quarter.