UNION

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

In Assumptions & result sets

The UNION function combines the result sets of two or more input nodes into one output.

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: UNION('Salary Q1', 'Salary Q2').

Parameters

Node1Node referenceRequired
First input node to combine
Node2Node referenceRequired
Second input node to combine
Additional nodesNode referenceOptional
Any number of additional input nodes to combine

Output shape

Dimensionality
Same as all inputs (they must all have the same levels).
Level values
Union of all level values from all inputs.
Row count
Sum 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.

Example

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

YearEmployeeUNION Result
2025E150,000
2025E260,000
2026E155,000
2026E266,000

See also

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