Reference Updated April 8, 2026

ROLLUP

Category: Dimensionality & hierarchies

Syntax Change in Version 7.1: This function no longer requires dimension names, only level names. Scroll to Version History for details.

Overview

The ROLLUP function aggregates values by reducing a node to only the specified levels. All other levels are removed and their values are aggregated.

Use this function when you want to calculate totals or summaries across dimensions while keeping only the levels relevant for your analysis.

If no levels are specified, ROLLUP aggregates the entire node into a single number.

Syntax

From 7.1

ROLLUP('Node', "Level1" [, "Level2", ...] [, "AggregationType"])

Example usage: ROLLUP('Sales', "Year")

Before 7.1

ROLLUP('Node', "Dimension1", "Level1" [, "Dimension2", "Level2", …] [, "AggregationType"])

Example usage: ROLLUP('Sales', "Time", "Year")

Parameters

ParameterDescriptionTypeRequiredDefault
NodeInput node, specified in single quotes (e.g. 'Sales')Node referenceYes
Level1, Level2, …Level names to keep in the output, specified in double quotes (e.g. "Year")Level nameNo
AggregationTypeAggregation method for combining valuesStringNoNode’s own aggregation type (typically "SUM")

See also:Aggregation Settings for all available aggregation methods

Output Shape

AspectBehavior
DimensionalityReduces to only the specified levels
Removed levelsAll other levels are aggregated
Row countReduced
No levels specifiedReturns a single number

Watch Out

  • ROLLUP removes all levels that are not explicitly specified.
  • If no levels are provided, the result is a single aggregated value.
  • The specified levels must exist in the input node.
  • You can specify at most one level per dimension.
  • The specified level cannot be more granular than the levels present in the input node.

Examples

Input node: Sales Describes quantity of products sold across time and categories.

Product GroupProductYearMonthValue
CarsModel T20252025-0111
CarsModel T20252025-035
MotorcyclesV-Twin20262026-027
Motorcycles101 Scout20262026-0119

Rolling up to a single total

Aggregates all values into one result.

Formula: ROLLUP('Sales')

→ ROLLUP Result
11 + 5 + 7 + 19 = 42

Rolling up with average

Uses AVG instead of the default SUM.

Formula: ROLLUP('Sales', "AVG")

→ ROLLUP Result
(11 + 5 + 7 + 19) / 4 = 10.5

Rolling up to specific levels

Keeps only Year and Product Group, aggregates everything else.

Formula: ROLLUP('Sales', "Year", "Product Group")

Product GroupYear→ ROLLUP Result
Cars202511 + 5 = 16
Motorcycles20267 + 19 = 26

FunctionWhen to use instead
ROLLUP_TOWhen you want to match another node’s dimensionality automatically.
DROPLEVELWhen you know which levels to remove rather than keep.
EXPANDWhen you need to add levels instead of removing them.

Version History

VersionChange
7.1Syntax simplified to level names only. Dimension names are no longer required or validated.

Pre-7.1 Syntax (deprecated)

The previous syntax required dimension-level pairs:

ROLLUP('Node', "Dimension1", "Level1" [, "Dimension2", "Level2", …] [, "AggregationType"])

Example (deprecated):

ROLLUP('Sales', "Time", "Year", "Product", "Product Group")

Migration: Remove all dimension names, keep only level names:

ROLLUP('Sales', "Year", "Product Group")

Was this page helpful?