Skip to main content
Skip table of contents

ROLLUP

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

Overview

Aggregates a node by reducing it to only the specified levels. All other levels are removed and their values are aggregated. ROLLUP('Node') with no levels specified rolls up to a single scalar value.

Syntax

From 7.1

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

Before 7.1

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

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

Text

No

"SUM"

See also: Aggregation Settings for all available aggegation methods


Output Shape

Aspect

Behavior

Dimensionality

Reduces to only the specified levels; all other levels are removed

No levels specified

Returns a single scalar value (full aggregation)


Examples

Input node Quantity describes quantity of products sold across time and categories.

Dim

Product

Time

Value

Level

Product Group

Product

Year

Month

Level Values

Cars

Model T

2025

2025-01

11

2025-03

5

Motorcycles

V-Twin

2026

2026-02

7

101 Scout

2026

2026-01

19

Following examples describe Rolling up with different aggregation levels and aggregation functions. 

Rolling up to a single total

Aggregates all values into one result.

Formula:

ROLLUP('Quantity')

Output:

Value

11 + 5 + 7 + 19 = 42

Rolling up with average

Uses AVG instead of the default SUM.

Formula:

ROLLUP('Quantity', "AVG")

Output:

Value

(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")

Output:

Product Group

Year

Value

Cars

2025

11 + 5 = 16

Motorcycles

2026

7 + 19 = 26


Related Functions

Function

Relationship to ROLLUP

ROLLUP_TO

Rolls up Node1 to match Node2's dimensionality. Use when the target structure is defined by another node rather than explicit level names.

DROPLEVEL

Removes named levels (and finer levels in the hierarchy). Use ROLLUP to keep specific levels; DROPLEVEL to remove specific levels.

EXPAND

Opposite direction, adds levels via cross product. Also used to prepare nodes for simulation.


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")

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.