Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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)

5 Replies
spsrk_84
Creator III
Creator III

Hi,

Try like this

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

Regards,

Ajay

Not applicable
Author

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

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

Not applicable
Author

Hi,

Try using below formulae.

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

- Sridhar

Not applicable
Author

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.

d_pranskus
Partner - Creator III
Partner - Creator III

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.