DELTA_ABS

DELTA_ABS('Node', ["Dimension", ["FirstValueBehavior"]])

In Compare periods

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: DELTA_ABS('Revenue').

Parameters

NodeNode referenceRequired
Input node, specified using the node name in single quotes (e.g.'Profit')
DimensionDimension nameOptional
The dimension along which consecutive values are compared. Default: "Time" at the node’s finest level.
FirstValueBehaviorKeywordOptional
How the first value in each series of consecutive values is handled. Default: "SKIP_FIRST".
  • "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

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 current - previous along the chosen Dimension. Results are signed and can be negative.
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_ZERO or FIRST_VALUE to 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'

YearMonthProductValue
20252025-11A-30
20252025-11B2
20262026-04A25
20262026-05B-10
20262026-05C15

Formula: DELTA_ABS('Input node')

Equivalent to: DELTA_ABS('Input node', "Time", "SKIP_FIRST")

YearMonthProductCalculationResult
20262026-04A25 - (-30)55
20262026-05B-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")

YearMonthProductDELTA_ABS Result
20252025-11A0
20252025-11B0
20262026-04A55
20262026-05B-12
20262026-05C0

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

YearMonthProductDELTA_ABS Result
20252025-11A-30
20252025-11B2
20262026-04A55
20262026-05B-12
20262026-05C15

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'

ProductValue
A10
B30
C15

Formula: DELTA_ABS('Sales', "Product")

ProductCalculationResult
B30 - 1020
C15 - 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.

See also

DELTA_REL
When you need the relative change (percentage) instead of the absolute difference.
YOY_ABS
When you need year-over-year absolute change with filled missing values.
QOQ_ABS
When you need absolute change specifically quarter-over-quarter.
Was this page helpful?