Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ramkrishna86
Creator II
Creator II

Cumulative sum in qliksense Bar Chart with two dimensions

Hello Guys,

Could you please help me how to calculate cumulative sum in qlik sense bar chart with 2 Dimensions.

This expression only works for 1 dimension:

rangesum( above( sum([Expression1]),0,rowno()))


I have data like below table where MonthName and Industry are dimensions in chart and Amount is Measure.


   

MonthNameIndustry       Amount       Year
JanAA1002015
FebBB2002015
MarCC3002015
AprDD4002015
MayEE5002015
JunFF6002015
JulGG7002015
AugHH8002015
SepII9002015
OctJJ10002015
NovKK11002015
DecLL12002015

Your help is really appreciated.

Thanks,

Ram Krishna

1 Solution

Accepted Solutions
sunny_talwar

Here you go.... You will need to do some script manipulation to get this to work

Capture.PNG

View solution in original post

14 Replies
sunny_talwar

May be this:

RangeSum(Above(TOTAL Sum([Expression1]), 0, RowNo(TOTAL)))

ramkrishna86
Creator II
Creator II
Author

Hi Sunny,

This only works with one dimension not with 2 dimension in chart.

Thanks,

Ram Krishna

sunny_talwar

I don't see a reason why it won't work.... Do you have a sample you can share your qvf where this is not working?

ramkrishna86
Creator II
Creator II
Author

Hi Sunny,

I have attached a qvf file for you reference. You will see that above code works with only 1 dimension not with 2 dimension.

I am aware of above code and already worked with single dimension in many projects, Issue is when you add second dimensions in x-axis it will not work.

Thanks,

Ram Krishna

sunny_talwar

Are you looking for one of these output?

Capture.PNG

ramkrishna86
Creator II
Creator II
Author

No, Value should be like same as Cumulative Sum with 1 dimension(By Month).

Capture.JPG

ramkrishna86
Creator II
Creator II
Author

You above value is showing the sum of the different industry by Month, not the cumulative sum.

sunny_talwar

I am not full understanding what you are after? Each month you have different industry?? I guess you are after the totals with 1 dimension?? But I am trying to understand how it would show up in two dimensions?

ramkrishna86
Creator II
Creator II
Author

Actually i want cumulative sum By Industry and By Month in single graph(So taken 2 dimensions Industry and Month)