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 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 scalar value.
Syntax
From 7.1
ROLLUP(Node, Level1 [, Level2, ...] [, AggregationType])
Example usage
ROLLUP('Quantity', "Year")
Before 7.1
ROLLUP(Node, Dimension1, Level1 [, Dimension2, Level2, β¦] [, AggregationType])
Example usage
ROLLUP('Quantity', "Time", "Year")
Parameters
Parameter | Description | Type | Required | Default |
|---|---|---|---|---|
Node | Input node, specified in single quotes | Node reference | Yes | β |
Level1, Level2, ... | Level names to keep in the output | Level name | No | β |
AggregationType | Aggregation method for combining values | String | No |
|
See also: Aggregation Settings for all available aggregation methods
Output Shape
Aspect | Behavior |
|---|---|
Dimensionality | Reduces to only the specified levels |
Removed levels | All other levels are aggregated |
Row count | Reduced |
No levels specified | Returns a single scalar value |
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.
Examples
Input node: Quantity
Describes quantity of products sold across time and categories.
Product Group | Product | Year | Month | Value |
|---|---|---|---|---|
Cars | Model T | 2025 | 2025-01 | 11 |
Cars | Model T | 2025 | 2025-03 | 5 |
Motorcycles | V-Twin | 2026 | 2026-02 | 7 |
Motorcycles | 101 Scout | 2026 | 2026-01 | 19 |
Rolling up to a single total
Aggregates all values into one result.
Formula
ROLLUP('Quantity')
β ROLLUP Result |
|---|
11 + 5 + 7 + 19 = 42 |
Rolling up with average
Uses AVG instead of the default SUM.
Formula
ROLLUP('Quantity', "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('Quantity', "Year", "Product Group")
Product Group | Year | β ROLLUP Result |
Cars | 2025 | 11 + 5 = 16 |
Motorcycles | 2026 | 7 + 19 = 26 |
Related Functions
Function | When to use instead |
|---|---|
Rolls up a node to match another nodeβs dimensionality | |
Removes specific levels instead of keeping selected ones | |
Adds levels via cross product and expands dimensionality |
Version History
Version | Change |
|---|---|
7.1 | Syntax 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('Quantity', "Time", "Year", "Product", "Product Group")
Migration: Remove all dimension names, keep only level names:
ROLLUP('Quantity', "Year", "Product Group")