Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
Try like this:
aggr(Rangesum(Above(Sum(Sales),0,rowno())),Month)
Br,
KC
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
Yes, it's possible. But if you pivot you should change the expression to use Before() -for rows- instead of Above() -for columns-
Hi Migual,
I done same what u suggested ,now also i am getting result "Zero".
Can you check with my data?
Regards
Mahesh
Try like this:
aggr(Rangesum(Above(Sum(Sales),0,rowno())),Month)
Br,
KC
HI KC,
In app result is showing '-' ,can you please the sample app?
Regards
Mahesh
Please refer the attached.