ROLLUP_TO

ROLLUP_TO('Node1', 'Node2')

In Dimensionality & hierarchies

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

The ROLLUP_TO function rolls up a node to match the level-dimensionality of another node. All levels that exist in the first node but not in the second are removed, and their values are aggregated.

Use this function when you want to automatically match one node’s dimensionality to another without manually specifying which levels to keep: ROLLUP_TO('Profit', 'Budget').

Parameters

Node1Node referenceRequired
The input node to be rolled up, specified in single quotes (e.g. 'Detail')
Node2Node referenceRequired
The target node whose level-dimensionality defines the output shape, specified in single quotes (e.g. 'Summary')

Output shape

Dimensionality
Reduced to only the levels present in Node2
Values
Only the values of Node1 are used; Node2 only determines the shape
Row count
Reduced. Values are aggregated across the removed levels

Watch out

  • Node2 cannot contain levels that are not in Node1. Every level in Node2 must also exist in Node1.
  • Node1 and Node2 cannot have the same set of levels. Node2 must have fewer levels than Node1, otherwise there is nothing to roll up.
  • The formula can feature only two inputs.
  • The values of Node2 are ignored. Only its dimensional structure matters.

Example

Input node: 'Profit'

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

Target node: 'Budget' Budget data only has Product Group and Year.

Product GroupYearValue
Cars202550
Motorcycles202670

Match dimensionality of a target node

You want to compare actual quantities against budget, but the budget node only has Product Group and Year, no Product or Month detail.

Formula: ROLLUP_TO('Profit', 'Budget')

Product GroupYearCalculationResult
Cars202511 + 516
Motorcycles20267 + 1926

Product and Month are removed because they don’t exist in Budget. The values of Budget (50, 70) are not used, only its dimensional structure.

See also

ROLLUP
When you know exactly which levels to keep.
DROPLEVEL
When you know which levels to remove.
EXPAND
When you need to add levels instead of aggregating.

Version history

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

Pre-7.1 Syntax (deprecated)

The previous ROLLUP 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?