Description
Accumulates each Item of a List using its ordering.
Syntax
CUMULATE(Number, Cumulated Dimension [, Group Dimension] [, Aggregation])
First parameter:
Numbercan be a Metric or a List PropertyCumulated Dimension: a List according to which cumulation is made. Must be one of the Dimensions of the first parameterGroup Dimension: a List that resets the accumulation (optional)AggregationSUM, AVG, MIN, MAX (optional)
Return type
number
Examples
Case | Results | Return Type |
|---|---|---|
| Cumulates 10 on each month starting from the first period of the calendar (ex. Jan 20: 10, Feb 20: 20, Mar 20: 30, etc.) |
|
| Cumulates the Metric |
|
| Cumulates the Metric |
|
| Averages the Metric |
|
Use ON operator with CUMULATE
You can use the ON operator to change the order of accumulation in the CUMULATE function. An example of how to do this is below. This Metric uses the Vacuum Cleaner Dimension and represents inventory:
| |
|---|---|
Vacuum Cleaner A | 30 |
Vacuum Cleaner B | 48 |
Vacuum Cleaner C | 24 |
If you were to create a new Metric using the Vacuum Cleaner Dimension, you could accumulate the values by using the CUMULATE function. The default formula looks like this:CUMULATE(CDO01 Inventory, ‘Vacuum Cleaner’)
And the output looks like this:

However, you can change the order in which the values are accumulated by referencing an integer Property in the formula. Check out the Priority Property in the Vacuum Cleaner Dimension below.

You can change the order of the accumulation by using the ON operator as follows:
CUMULATE(CDO01 Inventory, ‘Vacuum Cleaner’ on ‘Vacuum Cleaner’.Priority)
Remember to include the ON operator in the second argument of the function. This helps you determine the closing balance after fulfilling sales orders.
See the output below:

The inventory is now being accumulated in the order of the Priority Property.
Excel equivalent: None
See also: DECUMULATE