RUNNINGSUM
Category: Rollforward & time series
Overview
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.
Syntax
RUNNINGSUM('Node')
Example usage: RUNNINGSUM('Profit')
Parameters
Parameter | Description | Type | Required |
|---|---|---|---|
Node | Input node, specified using the node name in single quotes (e.g. | Node reference | Yes |
Output Shape
Aspect | Behavior |
|---|---|
Dimensionality | Preserves the input shape |
Row count | Same number of rows as the input node |
Time axis | Each period accumulates all preceding values |
Non-time dimensions | 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
Year | Value |
|---|---|
2025 | 10 |
2026 | 20 |
2027 | 15 |
Formula: RUNNINGSUM('Profit')
Year | → RUNNINGSUM Result |
|---|---|
2025 | 10 |
2026 | 10 + 20 = 30 |
2027 | 10 + 20 + 15 = 45 |
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
Year | Region | Value |
|---|---|---|
2025 | EMEA | 50 |
2026 | EMEA | 60 |
2025 | APAC | 30 |
2026 | APAC | 40 |
Formula: RUNNINGSUM('Revenue')
Year | Region | → RUNNINGSUM Result |
|---|---|---|
2025 | EMEA | 50 |
2026 | EMEA | 50 + 60 = 110 |
2025 | APAC | 30 |
2026 | APAC | 30 + 40 = 70 |
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
Year | Value |
|---|---|
2024 | N/A |
2025 | 100 |
2026 | N/A |
2027 | 50 |
Formula: RUNNINGSUM('Payments')
Year | → RUNNINGSUM Result |
|---|---|
2025 | 100 |
2026 | 100 + 0 = 100 |
2027 | 100 + 0 + 50 = 150 |
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.
Related Functions
Function | When to use instead |
|---|---|
Running totals that reset within each year, quarter, month, or week. | |
Cumulative multiplication along the time axis instead of summation. | |
Calculates sums over a sliding window of periods. | |
Calculates averages over a sliding window of periods. | |
Project values forward in time. |