Reference Updated April 8, 2026

UNION

Category: Assumptions & result sets

Overview

The UNION function combines the result sets of two or more input nodes into one output. All inputs must have the same levels and must not have overlapping rows.

Use this function when you want to append non-overlapping result slices from nodes that share the same dimensional structure. UNION is a stricter version of ADDITION (+) and can serve as an extra guardrail because the inputs are required to have the same levels.

Syntax

UNION('Node1', 'Node2' [, 'Node3', ...])

Example usage: UNION('Salary Q1', 'Salary Q2')

Parameters

ParameterDescriptionTypeRequired
Node1First input node to combineNode referenceYes
Node2Second input node to combineNode referenceYes
Additional nodesAny number of additional input nodes to combineNode referenceNo

Output Shape

AspectBehavior
DimensionalitySame as all inputs (they must all have the same levels).
Level valuesUnion of all level values from all inputs.
Row countSum of all input row counts. No aggregation or deduplication is performed.

Watch Out

  • All inputs must have the same levels.
  • Inputs must not have overlapping rows. If any row key appears in more than one input, the calculation fails at runtime.
  • The same node cannot appear more than once in the parameter list.
  • All inputs must have the same unit.

Examples

Appending non-overlapping slices

This example shows UNION combining two disjoint salary slices with the same level structure. Because the rows do not overlap, the result appends both slices into one output.

Input node: Node1

YearEmployeeSalary
2025E150,000
2025E260,000

Input node: Node2

YearEmployeeSalary
2026E155,000
2026E266,000

Formula: UNION('Node1', 'Node2')

YearEmployee→ UNION Result
2025E150,000
2025E260,000
2026E155,000
2026E266,000

FunctionWhen to use instead
ADDITION (+)When overlap is allowed or expected, or when the inputs do not need UNION’s same-level and no-overlap constraints.
ROLLUPWhen you need to change granularity or aggregate a node to different levels instead of combining disjoint result slices.
Was this page helpful?