DELTA_ABS
Category: Compare periods
Overview
Description | Calculates the absolute difference between consecutive values within the selected dimension. Use this when you need the absolute change between consecutive values along any dimension, not just time. |
Syntax |
|
Parameters |
|
Limitations |
|
Examples
Default: skipping first values
The function subtracts the value of the previous available entry from the current one, based on the order of the specified dimension "Time". The missing entries in "Month" are skipped. There is no interpolation or implicit zero.
Input node: Input node
Year | Month | Product | Value |
|---|---|---|---|
2025 | 2025-11 | A | 1 |
2025 | 2025-11 | B | 2 |
2026 | 2026-04 | A | 20 |
2026 | 2026-05 | B | -10 |
Formula: DELTA_ABS('Input node') = DELTA_ABS('Input node', "Time", "SKIP_FIRST")
Year | Month | Product | → DELTA_ABS Result |
|---|---|---|---|
2026 | 2026-04 | A | 19 (= 20 - 1) |
2026 | 2026-05 | B | -12 (= -10 - 2) |
First values as zero
With FIRST_AS_ZERO, the first entry per group gets a result of 0 instead of being omitted.
Formula: DELTA_ABS('Input node', "Time", "FIRST_AS_ZERO")
Year | Month | Product | → DELTA_ABS Result |
|---|---|---|---|
2025 | 2025-11 | A | 0 |
2025 | 2025-11 | B | 0 |
2026 | 2026-04 | A | 19 |
2026 | 2026-05 | B | -12 |
Keeping first values
With FIRST_VALUE, the first entry per group keeps its original value instead of being omitted or zeroed.
Formula: DELTA_ABS('Input node', "Time", "FIRST_VALUE")
Year | Month | Product | → DELTA_ABS Result |
|---|---|---|---|
2025 | 2025-11 | A | 1 |
2025 | 2025-11 | B | 2 |
2026 | 2026-04 | A | 19 |
2026 | 2026-05 | B | -12 |