PW
Category: Compare periods
Overview
Description | Shifts the input node Node one week into the future while retaining all other dimensions. Use this when you need last week's values alongside current data for week-over-week comparisons. |
Syntax |
|
Parameters | Node: Input node that is shifted, specified using the node name in single quotes (e.g. |
Examples
Shifting values by one week
Each value appears one week later in the result.
Input node: Profit
Week | Value |
|---|---|
2025-W01 | 35 |
2025-W02 | 42 |
2025-W03 | 47 |
Formula: PW('Profit')
Week | → PW Result |
|---|---|
2025-W02 | 35 |
2025-W03 | 42 |
2025-W04 | 47 |
Shifting values by two weeks (nested PW)
Nesting PW calls shifts values further into the future. Here, each value moves two weeks forward.
Try SHIFT as an alternative with a custom offset.
Input node: Profit
Week | Value |
|---|---|
2025-W01 | 38 |
2025-W02 | 45 |
2025-W03 | 52 |
Formula: PW(PW('Profit'))
Week | → PW Result |
|---|---|
2025-W03 | 38 |
2025-W04 | 45 |
2025-W05 | 52 |