RUNNINGSUM

RUNNINGSUM('Node')

In Rollforward & time series

The RUNNINGSUM function calculates a cumulative total along the time axis.

Each period’s value equals the sum of all values from the first non-empty period up to and including the current period.

Use this function when you want to track how values accumulate over time or as a helper function: RUNNINGSUM('Profit').

Parameters

NodeNode referenceRequired
Input node, specified using the node name in single quotes (e.g. 'Profit')

Output shape

Dimensionality
Preserves the input shape
Row count
Same number of rows as the input node
Time range
Each period accumulates all preceding values
Non-time behavior
Running sum is calculated independently for each combination

Watch out

  • RUNNINGSUM requires a time dimension in the input node.
  • The cumulative calculation follows the chronological order of the time hierarchy.
  • Each combination of non-time dimensions is accumulated independently.
  • Periods before the first non-empty value are omitted from the output.
  • Missing values after the first non-empty period are treated as zero.

Examples

Basic cumulative total

Input node: 'Profit'

YearValue
202510
202620
202715

Formula: RUNNINGSUM('Profit')

YearCalculationResult
202510
202610 + 2030
202710 + 20 + 1545

Multi-dimensional input

When the node has additional dimensions (e.g. Region), the running sum is calculated independently for each dimensional combination.

Input node: 'Revenue'

YearRegionValue
2025EMEA50
2026EMEA60
2025APAC30
2026APAC40

Formula: RUNNINGSUM('Revenue')

YearRegionCalculationResult
2025EMEA50
2026EMEA50 + 60110
2025APAC30
2026APAC30 + 4070

Each region accumulates its values independently over time.

Behavior with gaps in the data

When the input has missing values for some time periods, RUNNINGSUM skips leading empty periods and treats later gaps as zero.

Input node: 'Payments'

YearValue
2024N/A
2025100
2026N/A
202750

Formula: RUNNINGSUM('Payments')

YearCalculationResult
2025100
2026100 + 0100
2027100 + 0 + 50150

2024 is omitted from the output because it is a leading empty period. 2026 has no value, so it is treated as zero, the running total carries forward unchanged.

See also

YTD
When you need running totals that reset within each year.
RUNNINGPROD
When you need cumulative multiplication along the time axis.
MOVINGSUM
When you need a sum over a sliding window instead of from the start.
MOVINGAVG
When you need an average over a sliding window instead of a cumulative total.
ROLLFORWARD_ADVANCED
When you want to project values forward in time.
Was this page helpful?