CumulativeSum function

The CumulativeSum function returns the running total of a sequence of numbers. A running total is the summation of a sequence of numbers which is updated each time a new number is added to the sequence by adding the value of the new number to the previous running total. Float and Integer data types.

Ascending order is used by default, but the Desc option can be used to change the order to a descending order. In the Statement Editor interface, select the Desc icon to switch to descending order. In the Statement Text Editor, add DESC to the function.

The CumulativeSum function can be used to help create a running cumulative percent of an entire table or a running percent of total (Pareto analysis).

This function requires also using the OrderBy() function. The PartitionBy() function is optional. The best practice is to use a Rank function with CumulativeSum, as the CumulativeSum function groups members with the same value, which may cause the function to calculate values differently than expected when there are duplicate values.

Last modified: Friday May 12, 2023

Is this useful?