1. Calculation functions
  2. All Functions
  3. Time and Date Functions
  4. CUMULATE

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.

Syntax

CUMULATE (Values to add, Boolean, List)

Arguments

ArgumentData typeDescription
Values to add (required)NumberThe number formatted line item whose values are added together. 
Boolean BooleanA Boolean parameter which can be used to reset the adding of values. This is an optional argument. 
List N/AThe list of items across which values are added. This is an optional argument. 

The CUMULATE function returns a number. 

Constraints

  • The line item that contains your result must be number formatted.
  • If you use a list parameter, the order the values are added follows the original order of the list in General Lists, even if the list is reordered. 
  • The time range for the values to be added and the line item that contains your result, must match. 
  • A non-time series function, if used as a subexpression of this function, must have the same time range as the line item to which the formula is applied. Combining time series functions and non-time series functions with a time range can return an unexpected result or an error message. For more, see Time Ranges and Time Series Functions.

Excel equivalent 

Related Anaplan functions

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 148351671

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


Jan 12Feb 12Mar 12Apr12
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 148351671