English

The function CUMULATE adds values and returns a number. By default, the values are added across a time period. You can also choose to add values across a list.

CUMULATE (Values to add [, Boolean] [, List])

Arguments

ArgumentData typeDescription
Values to add (required)NumberThe numeric line item to cumulatively add the values of.
BooleanBooleanA Boolean argument that you can use to reset the cumulation of values.
List N/AA list of items to add the values of.

The CUMULATE function returns a number. 

Constraints

Order of List argument

If you provide the List argument, the order in which values are added follows the original order of the list in General Lists, even if the list is reordered. 

Time range requirements

The time range used for the Values to add argument must match the time range for the result line item.

Calculation engine functionality differences

In Polaris, you cannot use CUMULATE in formulas of line items with a formula summary method. In the Classic Engine, you can.

In Polaris, the List argument must identically match a dimension of the line item to which the formula is applied. In the Classic engine, you can also use a subset of a line item dimension as List. 

Excel equivalent 

Examples

In the example below, CUMULATE is used with a number formatted Sales line item as single source parameter. It adds Sales values over time in months.


Jan 12Feb 12Mar 12Apr12
Sales88,75387,45088,94586,523

Cumulative sales 

CUMULATE(Sales)

88,753 176,203265,148351,671

The second example below uses a Boolean parameter. It resets the cumulative calculation for Sales in March


Jan 12Feb 12Mar 12Apr 12
Sales88,75387,45088,94586,523

Cumulative sales

CUMULATE(Sales)

88,753 176,20388,945 175,468
Reset Sales cumulate


The third example below uses the list parameter Sales Reps, without a Boolean parameter. This is set to FALSE. 


Edgar HarringtonJoe TippleHarry BoydeNicky Spinks
Sales88,75387,45088,94586,523

Cumulative sales 

CUMULATE(Sales, FALSE, Sales Reps)

88,753 176,203265,148351,671


Disclaimer

We update Anapedia content regularly to provide the most up-to-date instructions.