SUBTRACTION (-)
Category: Math & numeric
Overview
Description | Subtracts nodes by rolling them up to the same set of levels (intersect). The result has the coarser level of each shared dimension of the input nodes. Use when you want standard subtraction across shared levels after both inputs are aligned to their common dimensionality. |
Syntax |
|
Parameters |
|
We recommend to add all costs as negative values, hence you will not need the subtraction often.
Examples
Shared Dimensions With Roll-Up
This example shows how subtraction behaves as the opposite operation to ADDITION (+) when both inputs share the Year dimension but use different detail levels.
Input node: Node A
Year | Value |
|---|---|
2025 | 5 |
2026 | 10 |
Input node: Node B
Year | Product | Value |
|---|---|---|
2025 | A | 2 |
2026 | A | 3 |
2026 | B | 4 |
Formula: 'Node A' - 'Node B'
Year | → SUBTRACTION Result |
|---|---|
2025 | 5-2 = 5 |
2026 | 10-(3+4) = 3 |
Related Functions
When you want to combine values across the same shared-level alignment logic but add them instead of subtracting them. | |
When you want to combine nodes through another arithmetic operator and multiply values instead of subtracting them. |