Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to create a table that does a cumulative sum like this:
id | date | cumulative sum |
53302 | 2022-06-12 | 148.61 |
53302 | 2022-06-13 | 297.22 |
53302 | 2022-06-14 | 297.22 |
What is important to note here is that I need the cumulative sum on ALL the dates of the calendar. Any ideas?
If you just need to add a column in this table, try this:
RangeSum(Above(Sum(Sales), 0, RowNo( ) ) )
In order for this to work the tables needs to be sorted by date.
Refer these articles
https://community.qlik.com/blogs/qlikviewdesignblog/2012/10/12/accumulative-sums
Hello Gui,
How about it if I need to partition by the id?
Thanks,
Marcela
Hi Marcela,
It will depend on the sorting you want to prioritize..
You can add new dimensions but the calculation will be messed up according to the sorting, because it takes the records from the previous row and adds up until the end (that is why we have the ABOVE function there).
Check this post, see if it helps: https://community.qlik.com/t5/Qlik-Design-Blog/Recipe-for-a-Pareto-Analysis-Revisited/ba-p/1473684