Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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

Re: Calculation Prior Year by selected Month

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

Not applicable

Re: Calculation Prior Year by selected Month

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])