The CUMULATE function calculates the sum of a given set of values either over a time period or across a specified list. By default, it calculates the sum over a time dimension. You can also include a Boolean line item to determine which values should be included in the accumulation.

Use the CUMULATE function to track progressive totals, such as cumulative sales across categories.

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

ArgumentData typeDescription
Values to add (required)NumberA numeric line item to cumulatively add the values of.
BooleanBooleanA Boolean line item that resets the cumulative total when TRUE.
List ListSee Calculation engine functionality differences.

The CUMULATE function returns a number. 

  • In Polaris, you can't use CUMULATE in formulas of line items with a formula summary method. In the Classic Engine, you can.
  • In Polaris, the List argument can be any list related to a dimension of the line item the formula is used on. If a different level of hierarchy is used, the argument aligns and matches with the corresponding level in the target's dimensional hierarchy.
  • In Polaris, the order of a List argument follows the correct hierarchical ordering instead of the order of the list in General lists.

In Classic, 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.

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

In the example below, CUMULATE is used to cumulate the numeric values of the Sales line item over Time in months.


Jan 12Feb 12Mar 12Apr12
Sales88,75387,45088,94586,523
CUMULATE(Sales)88,753 176,203265,148351,671

The second example below uses a Boolean, Reset Sales, to reset the cumulative total for a specific month. 


Jan 12Feb 12Mar 12Apr 12
Sales88,75387,45088,94586,523
CUMULATE(Sales, Reset Sales)88,753 176,20388,945 175,468
Reset Sales

true


The third example below uses the CUMULATE function to cumulate Sales over a list, Sales Reps. Boolean is set to FALSE as no reset condition is applied. 


Edgar HarringtonJoe TippleHarry BoydeNicky Spinks
Sales88,75387,45088,94586,523
CUMULATE(Sales, FALSE, Sales Reps)88,753 176,203265,148351,671

Calculate a running year-to-date (YTD) sales cumulative total that resets automatically when a new fiscal year begins.

Sales module

Create a Sales Performance module with these properties:

  • Rows: Line items
    • Monthly Revenue (Number format)
    • New Year Reset (Boolean format)
    • YTD Cumulative Revenue (Number format)
  • Columns: Time (in months)

Enter revenue across two fiscal years in the Monthly Revenue line item.


Nov 25Dec 25Jan 26Feb 26
Monthly Revenue10,00015,00012,0008,000

New Year Reset

YEAR(START()) <> YEAR(START() - 1)

 

YTD Cumulative Revenue

CUMULATE(Monthly Revenue, New Year Reset)

10,00025,00012,00020,000