PY
Category: Compare periods
Overview
Description | Shifts 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. |
Syntax |
|
Parameters | Node: Input node that is shifted, specified using the node name in single quotes (e.g. |
Examples
Shifting values by one year
Each value appears one year later in the result.
Input node: Profit
Year | Value |
|---|---|
2025 | 35 |
2026 | 42 |
2027 | 47 |
Formula: PY('Profit')
Year | → PY Result |
|---|---|
2026 | 35 |
2027 | 42 |
2028 | 47 |
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
Year | Value |
|---|---|
2025 | 38 |
2026 | 45 |
2027 | 52 |
Formula: PY(PY('Profit'))
Year | → PY Result |
|---|---|
2027 | 38 |
2028 | 45 |
2029 | 52 |