Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cumulation

Hi Team,

I need a solution for the below scenario.

If i have a data from 2000-Jan to till date and I want to show the data for 2016-jan to 2016-Nov(Current month). Sum value that I want to see in 2016-Jan is cumulative value from 2000-Jan to 2016-Jan. For 2016-Feb, cumulative value from 2000-Jan to 2016-Feb and so and so forth till 2016-Nov(Current month).

Expected Result:

  

DateTotal Sales
Jan-1612740
Feb-1612792
Mar-1612851
Apr-1612919
May-1612977
Jun-1613019
Jul-1613115
Aug-1613210
Sep-1613289
Oct-1613333
Nov-1613394

Regards

Srinivas

2 Replies
rubenmarin

Hi SrinivasaRao, for that sample you can use this script:

LOAD Date,

     Year(Date) as Year,

     Sales,

     RangeSum(Sales, Peek(SalesAcum)) as SalesAcum

FROM [.\SampleData.xlsx] (ooxml, embedded labels, table is Sheet1);

For the table you only need Date as dimension and this expression:

Only({<Year={$(=Max(Year))}>} SalesAcum)

or if you want to ignore selections:

Only({1<Year={$(=Max({1} Year))}>} SalesAcum)

ElizaF
Creator II
Creator II

Hi,

You can use also the The As-Of Table concept.

The As-Of Table