Reference Updated March 24, 2026

PY

Category: Compare periods

Overview

DescriptionShifts the input node Node one year into the future while retaining all other dimensions. Use this when you need last year’s values alongside current data for year-over-year comparisons.
SyntaxPY('Node')
ParametersNode: Input node that is shifted, specified using the node name in single quotes (e.g. 'Profit')

Examples

Shifting values by one year

Each value appears one year later in the result.

Input node: Profit

YearValue
202535
202642
202747

Formula: PY('Profit')

Year→ PY Result
202635
202742
202847

Shifting values by two years (nested PY)

Nesting PY calls shifts values further into the future. Here, each value moves two years forward. Try SHIFT as an alternative with a custom offset.

Input node: Profit

YearValue
202538
202645
202752

Formula: PY(PY('Profit'))

Year→ PY Result
202738
202845
202952

FunctionWhen to use instead
PQWhen you need the previous quarter instead of the previous year.
SHIFTWhen you need a custom offset or want to shift along a specific time level.
YOY_ABSWhen you need the absolute difference to the previous year, not just the shifted values.
Was this page helpful?