Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Prior Year (Rolling 12 Months)

Hi Guys,

Can you help me guys..

I've script Current Year :

Sum({Year=, Month=, Date={">=$(=MonthStart (Max(Date),-11))<=$(=Max(Date))"}, [Field]= {'A','B'}>} Amount

And How to write script for Prior Year (accumulation: rolling 12 Months).

Thanks & Regards

Valdi

3 Replies
Anonymous
Not applicable
Author

Hi, Try below,

Sum({Year=, Month=, Date={">=$(MonthStart(AddMonths(Max(Date),-11)))<=$(Max(Date))"}, [Field]= {'A','B'}>} Amount)


-Satya

Not applicable
Author

Hi Satya,

How about Prior Year?

Thanks & Regards.

Anonymous
Not applicable
Author

Hi,

Can you elaborate more on prior year 12 rolling months? Are you able to share example file?

Are you looking something like below,

Prior Year 12 rolling months:

Sum({Year=, Month=, Date={">=$(MonthStart(AddMonths(Max(Date),-23)))<=$(MonthEnd(AddMonths(Max(Date),-12)))"}, [Field]= {'A','B'}>} Amount)