Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikview979
Specialist
Specialist

Pivot Table Transpose with Cumulative in Qlik

Hi Experts,

How to do  Cumulative sum in pivot table with transpose level in qlik sense?

I can calculative cumulative sum in pivot table but,

Here my requirement is when i do transpose my cumulative expression is showing data is "zero".

for your reference i  attached snapshot.

Cumulative sales.PNG

INPUT:

T1:

Load * Inline [

ID,PRODUCT,SALES,MONTH

1,A,100,JAN2018

2,B,200,FEB2018

3,C,300,MAR2018

4,D,400,OCT2017

5,E,500,NOV2017

6,F,600,DEC2017

];

Expected O/P:-

Measures               Month

                                 Jan2018    Feb2018      Mar2018     Oct2017    Nov2017   Dec2017

Sales                          100             200              300              400            500           600

Cumulative sales        100            300              600              1000          1500           2100



Regards

Mahesh

1 Solution

Accepted Solutions
jyothish8807
Master II
Master II

Try like this:

aggr(Rangesum(Above(Sum(Sales),0,rowno())),Month)


Br,

KC

Best Regards,
KC

View solution in original post

11 Replies
qlikview979
Specialist
Specialist
Author

qlikview979
Specialist
Specialist
Author

My Dimension  and Expression is

Dimension:-Month

Expression:-Sum(Sales)

Cumulative Expression:- Rangesum(Above(Sum(Sales),0,rowno()))

Can any one help me on this?

Regards

mahesh

qlikview979
Specialist
Specialist
Author

Hi all,

Is it Possible in qlik?

mbaeyens

stalwar1

Regards

Mahesh

Miguel_Angel_Baeyens

Yes, it's possible. But if you pivot you should change the expression to use Before() -for rows- instead of Above() -for columns-

qlikview979
Specialist
Specialist
Author

Hi Migual,

I done same what u suggested ,now also i am getting result "Zero".

Can you check with my data?

Regards

Mahesh

jyothish8807
Master II
Master II

Try like this:

aggr(Rangesum(Above(Sum(Sales),0,rowno())),Month)


Br,

KC

Best Regards,
KC
jyothish8807
Master II
Master II

Pivot.JPG

Best Regards,
KC
qlikview979
Specialist
Specialist
Author

HI KC,

In app result is showing '-' ,can you please the sample app?

Regards

Mahesh

jyothish8807
Master II
Master II

Please refer the attached.

Best Regards,
KC