Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
phoenix
Creator
Creator

Rolling 12 months sum

Hi, I have below dataset with month_end date and Sales. I have to calculate Rolling 12 month sales for each month end.

I have tried

sum(aggr(rangesum(above( total sum({<month_end=>}sales),0,12)),month_end)) , but for 20140131, for past 12 it is picking up values for 20150831,0731.... in a round robin way.

for 20140131 I just want to see rolling 12 mon sum for sales = 100 . Are there any other ways to accomplish Rolling 12 month sum with these month end dates?

   

month_endsales
20140131100
20140228101
20140331102
20140430103
20140531104
20140630105
20140731106
20140831107
20140930108
20141031109
20141130110
20141231111
20150131112
20150228113
20150331114
20150430115
20150531116
20150630117
20150731118
20150831119
10 Replies
sinanozdemir
Specialist III
Specialist III

Hi,

I might have an answer for you. I believe we may need to implement sorted Aggr() function so that when you sort the dimensions, the 12 month rolling sum won't change:

Capture.PNG

Capture.PNG

Let me know if this is what you are looking for.

Thanks