# PW
URL: https://docs.valsight.ai/pw/
Description: Shifts the input 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.
**Category:** [Compare periods](/compare-periods/)

## Overview

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.

## Syntax

`PW('Node')`

## Parameters

| Parameter | Description                                                                                  | Type           | Required |
| --------- | -------------------------------------------------------------------------------------------- | -------------- | -------- |
| **Node**  | Input node that is shifted, specified using the node name in single quotes (e.g. `'Profit'`) | Node reference | Yes      |

## 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](/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        |

## Related

| Function              | When to use instead                                                                      |
| --------------------- | ---------------------------------------------------------------------------------------- |
| [PY](/py/)            | When you need the previous year instead of the previous week.                            |
| [SHIFT](/shift/)      | When you need a custom offset or want to shift along a specific time level.              |
| [WOW\_ABS](/wow-abs/) | When you need the absolute difference to the previous week, not just the shifted values. |
