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

Calculation Prior Year by selected Month

Hi Guys,

Please help me..

How to write script, if I want to see prior year by selected Month.

for example:

If I click Year 2014 and Month May then Summary Jun12-May13

If I click Year 2014 and Month April then summary May12-Apr13

and I've script YTD : sum({<YEAR=, MONTH=, DATE={">=$(MonthStart(Max(Date),-11))<=$(=Max(Date))"},[Field].

Thanks for help.

Regards.

2 Replies
Not applicable
Author

Somebody help me... (T_T)....

Not applicable
Author

Hello Valdi,

I guess you want sum(one-year data) of prior year of current selection, and the following one works.

=sum({$1 <Year={'<=$(=(max(Year)-1))'}, Month=,[Date] = {'<=$(=AddYears(max([Date]),-1))>=$(=Addmonths(max([Date]),-23))'}>} [Field])