Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to display cumulative total to date.

Hi Community,

I need to generate a report where for any month in which you select, you can see a column to the sales value of the month, and in another column the cumulative sales value from the first record for that product exists.


Regardless of which month or months select, cumulative column always shows me the total to that date.

Example: this is the input table,

ProductMonth Sales Accumulated
Aago-12 $ 300,00 $ 300,00
Asep-12 $ 620,00 $ 920,00
Aoct-12 $ 1.900,00 $ 2.820,00
Anov-12 $ 300,00 $ 3.120,00
Adic-12 $ 200,00 $ 3.320,00
Aene-13 $ 140,00 $ 3.460,00
Afeb-13 $ 500,00 $ 3.960,00
Amar-13 $ 300,00 $ 4.260,00
Aabr-13 $ 300,00 $ 4.560,00
Bmay-12 $ 50,00 $ 50,00
Bjun-12 $ 600,00 $ 650,00
Bjul-12 $ 350,00 $ 1.000,00
Bago-12 $ 200,00 $ 1.200,00
Bsep-12 $ 140,00 $ 1.340,00
Boct-12 $ 60,00 $ 1.400,00
Bnov-12 $ 50,00 $ 1.450,00
Bdic-12 $ 40,00 $ 1.490,00
Bene-13 $ 70,00 $ 1.560,00
Bfeb-13 $ 100,00 $ 1.660,00
Bmar-13 $ 200,00 $ 1.860,00
Babr-13 $ 40,00 $ 1.900,00
Coct-12 $ 50,00 $ 50,00
Cnov-12 $ 60,00 $ 110,00
Cdic-12 $ 240,00 $ 350,00
Cene-13 $ 120,00 $ 470,00
Cfeb-13 $ 100,00 $ 570,00
Cmar-13 $ 200,00 $ 770,00
Cabr-13 $ 60,00 $ 830,00

If I select "abr-2013", I must see:

ProductMonth Sales Accumulated
Aabr-13 $ 300,00 $ 4.560,00
Babr-13 $ 40,00 $ 1.900,00
Cabr-13 $ 60,00 $ 830,00

If I select "feb-2013" and "mar-2013", I must see:

ProductMonth Sales Accumulated
Afeb-13 $ 500,00 $ 3.960,00
Amar-13 $ 300,00 $ 4.260,00
Bfeb-13 $ 100,00 $ 1.660,00
Bmar-13 $ 200,00 $ 1.860,00
Cfeb-13 $ 100,00 $ 570,00
Cmar-13 $ 200,00 $ 770,00

Always, "Accumulated" column must display the cumulative sales value from the first date when this product has a row with sales registered.

This case is not YTD analysis, because I need display always from the first date, regardless if means a month ago, a year or a several years, for each product is different.

I try different workarounds for the "Accumulated" expresion, (using Set Analysis, Min(Date), TOTAL, etc), but I can't solve it.

Thanks in Advance.

best regards

Leandro.

0 Replies