Open in ClaudeOpen in ChatGPT

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')

Watch out

  • This function is only available on projects that use the week time dimension. A project has either Year, Quarter, Month and Day or Iso-Year, Week and Day, never both, so on a month-dimension project the node fails with an error saying the Week level could not be found. The time dimension is chosen per project, see Project Settings.

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
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?