Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

mclab_82
New Contributor II

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

Re: sum over 12 month for each month

You want to show values while selection?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
mclab_82
New Contributor II

Re: sum over 12 month for each month

YES

Re: sum over 12 month for each month

Here is one approach:

The As-Of Table

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

othniel2014
New Contributor III

Re: sum over 12 month for each month

Script:

Num([DateField])as NumDate

Graphic:

Sum({1<

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

>} [AmountField])

renuka_sasikumar
Contributor III

Re: sum over 12 month for each month

Hi,

Did you got the solution for this.