Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to calculate the sum of the previous 12 months of the selection. For example, if I choose 2013 as Year(Filter), I want to calculate the sum from Feb 2012 - Jan 2013 or If I choose 2013 as Year (filter) and March as Month(Filter, I want to calculate the sum from Apr 2012 - March 2013.
I am using this formula but it is giving me the wrong answer.
(Rangesum(Above((sum({$<Year = {$(=Only(Year))}>} Sales)),0,12)))
How can I solve this?
Thanks in Advance
Maria,
Try with this:
sum({< PeriodFilter=, [Period ID]={">=$(=max([Period ID])-12)<=$(=max([Period ID]))"}>} Sales)
Where PeriodFilter is the filter that use in your report
Regards.
siva
Maria,
Try with this:
sum({< PeriodFilter=, [Period ID]={">=$(=max([Period ID])-12)<=$(=max([Period ID]))"}>} Sales)
Where PeriodFilter is the filter that use in your report
Regards.
siva
From explanation, I understand that, you need sales for current month plus previous eleven months always.
I would recommend to assign unique value to each month (ID) in th script using Autonumber function and use set expression like below:
Sum ({< ID= {">= $(=Max(ID)-11) <= $(=Max(ID))"}>} Sales)