Cumulative sum drop to zero in QuickSight

In AWS QuickSight, I have a line chart that displays cumulative value of a column over time. I’m using calculated fields with runningSum() function to get the cumulative sum, like so:

runningSum(sum(COALESCE( NULLIF(col_one, '') , 0 )), [col_two ASC], [col_three])

The cumulative sum that I get first rises, then drops to zero and then rises again. Now, assuming, or rather considering, that the values in col_one will always be positive, the cumulative sum should never drop to zero once it goes up from zero,

Hi @enrico, sounds to me that the cumulative sum dropping to zero is because you are partitioning the calculation by the window of [col_three]. So for each [col_three], the calculation will start all over again, from 0. So if you don’t want to partition the calculation, you can simply leave the third argument blank, then the result will calculate the running sum for the whole table for you. Details please refer to the function user guide: runningSum - Amazon QuickSight