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

 Argument Data type Description Values to add (required) Number The number formatted line item whose values are added together. Boolean Boolean A Boolean parameter which can be used to reset the adding of values. This is an optional argument. List N/A The 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.

## 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 12 Feb 12 Mar 12 Apr12 Sales 88 753 87 450 88 945 86 523 Cumulative sales  CUMULATE(Sales) 88 753 176 203 265 148 351671

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

 Jan 12 Feb 12 Mar 12 Apr12 Sales 88 753 87 450 88 945 86 523 Cumulative sales CUMULATE(Sales) 88 753 176 203 88 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 Harrington Joe Tipple Harry Boyde Nicky Spinks Sales 88 753 87 450 88 945 86 523 Cumulative sales  CUMULATE(Sales, FALSE, Sales Reps) 88 753 176 203 265 148 351671