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

how to do cumulative sum of data?

I have an requirement to do cumulative sum of data for last 10 years with respect to quarter and output should only shows two years of data.

For reference I am showing for three years.

Year  Quarter    Sale                                  Output should have only two years data eventhough historical years are there.

                                                                          2013    Q1                100

2012    Q1         10                                            2013    Q2               110

2012    Q2         20                                             2013    Q3              130

2012    Q3         30                                             2013    Q4              160

2012    Q4          40                                          

2013    Q1         10                                             2014   Q1                200

2013    Q2         20                                             2014   Q2                210

2013    Q3         30                                             2014   Q3               230

2013    Q4          40                                             2014  Q4               260

2014    Q1         10

2014    Q2         20

2014    Q3         30

2014   Q4           40

Please let me know how to solve this issue?

4 Replies
PrashantSangle

Hi,

In your expression to calculate Sales nullify Year field

try like

sum({<Year=>}Sale)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi,

Can you explain how to do this and can you implement in attached qlikview file

Not applicable
Author

Here it is

Not applicable
Author

Hi ,

Thanks For the prompt reply

But I have to get only for last 2 years eventhough 3 years data is there .

and also want the output as below.

YearsQuarterSaleAccumulated
2014Q110100
2014Q220110
2014Q330130
2014Q440160
2015Q110200
2015Q220210
2015Q330230
2015Q440260