PY
PY('Node')
The PY function shifts the input node one year into the future while retaining all other dimensions.
Use this function when you need last year’s values alongside current data for year-over-year comparisons.
Parameters
- NodeNode referenceRequired
- 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'
| 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 |