PW

PW('Node')

In Compare periods

The PW function shifts the input node one week into the future while retaining all other dimensions.

Use this function when you need last week’s values alongside current data for week-over-week 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 week

Each value appears one week later in the result.

Input node: 'Profit'

WeekValue
2025-W0135
2025-W0242
2025-W0347

Formula: PW('Profit')

WeekPW Result
2025-W0235
2025-W0342
2025-W0447

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'

WeekValue
2025-W0138
2025-W0245
2025-W0352

Formula: PW(PW('Profit'))

WeekPW Result
2025-W0338
2025-W0445
2025-W0552

See also

PY
When you need the previous year instead of the previous week.
SHIFT
When you need a custom offset or want to shift along a specific time level.
WOW_ABS
When you need the absolute difference to the previous week, not just the shifted values.
Was this page helpful?