Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
Im trying to calculate the cumulative sum in qlik. It is working fine when we have single dimension but when i try to include multiple dims then the cumulative sum is getting reset.
For example
Month | Category | Sales |
Jan-25 | Home Loans | 100 |
Feb-25 | Home Loans | 100 |
Mar-25 | Home Loans | 100 |
Apr-25 | Home Loans | 100 |
May-25 | Home Loans | 100 |
Jun-25 | Home Loans | 100 |
Jul-25 | Home Loans | 100 |
Aug-25 | Home Loans | 100 |
Sep-25 | Home Loans | 100 |
Oct-25 | Home Loans | 100 |
Nov-25 | Home Loans | 100 |
Dec-25 | Home Loans | 100 |
Jan-25 | Credit cards | 200 |
Feb-25 | Credit cards | 200 |
Mar-25 | Credit cards | 200 |
Apr-25 | Credit cards | 200 |
May-25 | Credit cards | 200 |
Jun-25 | Credit cards | 200 |
Jul-25 | Credit cards | 200 |
Aug-25 | Credit cards | 200 |
Sep-25 | Credit cards | 200 |
Oct-25 | Credit cards | 200 |
Nov-25 | Credit cards | 200 |
Dec-25 | Credit cards | 200 |
for the above data what im looking for is the cumulative sum for Home loans for the month of Feb should be 200 and march 300 and so on. When i apply the formula the values that were generated were just the sum for that patricular month.
Formula used: rangesum(above(sum(sales),0,rowno())
Can u please suggest what can be done?
Hello,
Here is a video that explains how to use cumulative sum:
https://youtu.be/y6u3XXpstv4?si=e3rY3Qvcx7lBdoYN
make sure you sort your values by your column month and Category in the load script
Hey thanks for a quick response.
Im looking more generic way the reason is in my charts i provide the users with alternate dimensions and it should cater to those dims also.
Is there something i can do about that?
use a pivot table instead of a simple table :