Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I'm trying to compare amounts based on the max month available.
My issue occurs whenever I select a month, the expressions sum the selected month's amount instead of the previous month's amount.
Here's an example of my code
First Column:
=sum({<Reporting_Period_Num = {'=(max(Reporting_Period_Num))'}>} Account_Balance)
Second column:
=sum({<Reporting_Period_Num = {'=(max(Reporting_Period_Num)-1)'}>} Account_Balance)
You're right. Utilizing the master calendar is the better way to go here as I don't want to ignore the other filters
Hi Sunny,
Thanks for providing this response this has helped my implement a comparison between current and previous period.
Count({$<Period_seq={$(=max(Period_seq))}>} NPS)
Count({$<Period_seq={$(=max(Period_seq-1))}>} NPS)
1=30/11/2015
2=31/12/2015
3=31/1/2016
etc
I now want to include all data over the last 12 months, so need to add a greater than sign to the above, something like:
Count({$<Period_seq>{$(=max(Period_seq-13))}>} NPS)
Can you help?
Best wishes
May be this?
If(Period_seq > AddMonths(Max(Period_seq),-12), Count(NPS))
Or
Count({<Period_seq = {"> $(=AddMonths(Max(Period_seq),-12))"}>}NPS)
Or
Count({<Period_seq = {"> $(=AddYears(Max(Period_seq),-1))"}>}NPS)
Or
Count ({<Period_seq = {"=Aggr(If(Period_seq >AddMonths(Max(Period_seq),-1),Period_seq ),Period_seq )"}>} NPS)
Try like this:
Count({$<Period_seq = {"$(='>=' & Max(Period_seq-13) & '<=' & Max(Period_seq))"}>} NPS)
I would add less then equal to Max(Period_seq) to make sure you still see 12 months of data if you have made selections. Otherwise if you don't but the <= condition, you will see a lot of more data then you expect after selection in Period_seq
Thanks so much! This works!!