Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cumulative sum

I have an issue that i am trying to resolve using rangesum. It works fine when first initialized, however when i update the information the way i would like (sorting),  i would like the rangesum to accumulate using the new sorted numbers.

See example attached that someone had made in another topic. Instead of "e" showing the rangesum of 175 as the total from original load, i would like it to now show 42 , g would show 84 instead of 217 when I sort from highest to lowest value.

I am trying to rank sales of items based on a cumulative amount, as i would like to rank anything say below 75% of an amount as A, then between x and y, as B, and balance as C. I am stumped in moving forward. If needed, i can attach a sample of my actual application style i am working on. It is based on product sales, and therefore products have more than one attribute attached, and would like the sort to be done based on the $ sold. I have thought of doing this in the load script, however i am pulling information in more than one script load.

Thanks,

Andrew Kersys

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Not applicable
Author

hi

Gysbert_Wassenaar

See attached qvw


talk is cheap, supply exceeds demand
Not applicable
Author

Many Thanks

I now just need to have the value sorted based on 2 attributes instead of 1. but i am now much closer than i was.

BrunPierre
Partner - Master
Partner - Master

@Gysbert_Wassenaar  I wish to derive the cummulative column based on intially adding the daily amount to the Value,  then subsequently adding the daily amount to the resulting figure.

Could you please help, thanks.



Date Type Value Daily Amount Cummulative
29/04/2022 A 128.61 32.00 256.61
28/04/2022 A 128.61 32.00 224.61
27/04/2022 A 128.61 32.00 192.61
26/04/2022 A 128.61 32.00 160.61