DELTA_ABS
Category: Compare periods
Overview
The DELTA_ABS function calculates the absolute difference between consecutive values within a selected dimension. The result is signed (current - previous), so values can be negative.
Use this function when you need the absolute change between consecutive values along any dimension, not just time.
Syntax
DELTA_ABS('Node', ["Dimension", ["FirstValueBehavior"]])
Example usage: DELTA_ABS('Revenue')
Parameters
Parameter | Description | Type | Required | Default |
|---|---|---|---|---|
Node | Input node, specified using the node name in single quotes (e.g. | Node reference | Yes | -- |
Dimension | The dimension along which consecutive values are compared | Dimension name | No |
|
FirstValueBehavior | How the first value in each series of consecutive values is handled | Keyword | No |
|
FirstValueBehavior options:
"SKIP_FIRST": The first value in each series is removed from the result. This is the default."FIRST_AS_ZERO": The first value in each series is set to zero."FIRST_VALUE": The first value in each series is kept as it is.
Output Shape
Aspect | Behavior |
|---|---|
Dimensionality | Same as input. All dimensions and levels of the input are preserved. |
Granularity | The absolute difference is computed on the lowest available level of the chosen Dimension. |
Values | Each result row is |
Row count | With SKIP_FIRST, the first entry of each series is dropped, so row count is reduced. With FIRST_AS_ZERO and FIRST_VALUE, row count is preserved. |
Watch Out
The absolute difference is always calculated on the lowest available level of the specified dimension.
The function compares only entries that actually exist in the input. Missing values are skipped. To calculate the absolute difference with filled missing values, use YOY_ABS for year-over-year, or fill gaps before calling DELTA_ABS.
With SKIP_FIRST (default), series that contain only a single entry are dropped from the result entirely. Use
FIRST_AS_ZEROorFIRST_VALUEto keep them.If the chosen Dimension's levels are linked from levels in another Dimension within the input, the calculation fails. In that case, calculate the delta on the linking Dimension instead.
The result will use the same level links as those defined in dimension management. Do not use this function if your node needs level links that differ from the dimension's defaults.
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 chosen dimension "Time". Missing entries are skipped, and the first entry per series is dropped.
Input node: Input node
Year | Month | Product | Value |
|---|---|---|---|
2025 | 2025-11 | A | -30 |
2025 | 2025-11 | B | 2 |
2026 | 2026-04 | A | 25 |
2026 | 2026-05 | B | -10 |
2026 | 2026-05 | C | 15 |
Formula: DELTA_ABS('Input node') = DELTA_ABS('Input node', "Time", "SKIP_FIRST")
Year | Month | Product | -> DELTA_ABS Result |
|---|---|---|---|
2026 | 2026-04 | A | 25 - (-30) = 55 |
2026 | 2026-05 | B | -10 - 2 = -12 |
Product A's delta crosses zero: "ABS" means absolute (vs. relative) difference, not magnitude. Product C is missing from the output because it has only one entry, so SKIP_FIRST drops it.
First values as zero
Using the same input node as above. With FIRST_AS_ZERO, the first entry per series gets a result of 0 instead of being omitted, and single-entry series are preserved.
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 | 55 |
2026 | 2026-05 | B | -12 |
2026 | 2026-05 | C | 0 |
Product C now appears in the result with value 0 because its single entry is treated as a "first value".
Keeping first values
Using the same input node as above. With FIRST_VALUE, the first entry per series 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 | -30 |
2025 | 2025-11 | B | 2 |
2026 | 2026-04 | A | 55 |
2026 | 2026-05 | B | -12 |
2026 | 2026-05 | C | 15 |
Calculating deltas along a non-Time dimension
DELTA_ABS works on any dimension, not just Time. The example below uses a node that has only a Product level. Deltas are calculated along the Product order.
Input node: Sales
Product | Value |
|---|---|
A | 10 |
B | 30 |
C | 15 |
Formula: DELTA_ABS('Sales', "Product")
Product | -> DELTA_ABS Result |
|---|---|
B | 30 - 10 = 20 |
C | 15 - 30 = -15 |
The first product (A) is dropped under the default SKIP_FIRST. Each subsequent value is subtracted from the previous one along the Product dimension's order.