Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
aatish12345
Creator II
Creator II

Cumulative sum implementation in line chart

Hi All, i tried implementing cumulative sum in straight table using rangesum() function, it is working properly over there, but when i m using same expression in line chart then it is displaying normal sum and not cumulative one.

Kindly help me on this

=RangeSum(Above( Sum({<DUL_ATTR_SUMMARY_LEVEL={'RR TREND'},DUL_ATTR_TYPE={'OVERALL'},KPI_TYPE={'Resign Reversal'},FY=,RR_MONTH=,RR_MONTH_NAME=,Seq_Month_No_RR=,FY_RR_TREND=>}DUL_ATTR_KPI_ACTUAL),0,RowNo()))

 

this is the expression i am using and even i tried TOTAL as well in Above function but still it is not giving expected result.

 
 

attached is the screenshot of the same

1 Solution

Accepted Solutions
aatish12345
Creator II
Creator II
Author

Hi Brett,

Using trellis in line chart we can achieve the cumulative sum for 2 dimensions. But trellis use was not recommended in our project. So for workaround I had shown cumulative sum using rangesum() and above() function in  Straight Table.

I had shown MTD Normal sum in Line chart and YTD Cumulative sum in straight table and I had given a toggle button to switch between MTD Headcounts and YTD Headcounts

View solution in original post

7 Replies
aatish12345
Creator II
Creator II
Author

I have used 2 dimensions, mainly month and FY

Vegar
MVP
MVP

You could try to skip the RangeSum(Above(...)) with the full accumulation radio button for the expression.

Try using the expression below and tick the Full Accumulation button.

Sum({<DUL_ATTR_SUMMARY_LEVEL={'RR TREND'},DUL_ATTR_TYPE={'OVERALL'},KPI_TYPE={'Resign Reversal'},FY=,RR_MONTH=,RR_MONTH_NAME=,Seq_Month_No_RR=,FY_RR_TREND=>}DUL_ATTR_KPI_ACTUAL)

image.png

aatish12345
Creator II
Creator II
Author

Hi Vegar,

Thanks for the help.

I need to implement cumulative sum without using full accumulation function hence I'm trying it through Rangesum () function. Because I need to display percentage in some other chart using the accumulative sum.

Nagarjun_km
Contributor
Contributor

Hi,

 

Try this:

RangeSum(Above(TOTAL <Expression>, 1, RowNo(TOTAL)))

 

Hope this helps

 

Regards,

Nagarjun

aatish12345
Creator II
Creator II
Author

Hi Nagarjun,

thanks for the help!,

 

the solution you suggested is not working properly, and giving wrong counts. 

Brett_Bleess
Former Employee
Former Employee

Aatish, did you get things sorted out, or are you still looking for further assistance?  If you did get it figured out, please consider posting what you did and then mark that as the solution via the Accept as Solution button on that post.  If you still need help, it is likely going to be most helpful if you can attach a QVW file with some sample data etc., as it will be much easier for folks to dig into things that way, there are too many hidden things with the way we have been trying to do this one, if folks can see eveything, I expect they may be able to give you some further help.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
aatish12345
Creator II
Creator II
Author

Hi Brett,

Using trellis in line chart we can achieve the cumulative sum for 2 dimensions. But trellis use was not recommended in our project. So for workaround I had shown cumulative sum using rangesum() and above() function in  Straight Table.

I had shown MTD Normal sum in Line chart and YTD Cumulative sum in straight table and I had given a toggle button to switch between MTD Headcounts and YTD Headcounts