Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sum over 12 month for each month

Hi

I have a chart where for each month I need the cumulative sum of value over previous 12 months prior to that month

for example:

Jan 2016 = SUM({< MONTHS=Feb 2015 - Jan 2016  >} VALUE)

Feb 2016 = SUM({< MONTHS=Mar 2015 - Feb 2016  >} VALUE)

etc...

Thank you in advance for your help

5 Replies
Anil_Babu_Samineni

You want to show values while selection?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

YES

sunny_talwar

Here is one approach:

The As-Of Table

Other one is to use RangeSum(Above()) function on the front end

othniel2014
Contributor III
Contributor III

Script:

Num([DateField])as NumDate

Graphic:

Sum({1<

NumDate={$(='">= ' & $(=Num(MonthStart(AddMonths(min(Num([DateField])),-11)))) & ' <= ' & $(=floor(num(max([DateField])))) &'"')}

>} [AmountField])

renuka_sasikumar
Creator III
Creator III

Hi,

Did you got the solution for this.