# PQ
URL: https://docs.valsight.ai/pq/
Description: Shifts the input node one quarter into the future while retaining all other dimensions. Use this when you need last quarter's values alongside current data for quarter-over-quarter comparisons.
**Category:** [Compare periods](/compare-periods/)

## Overview

The **PQ** function **shifts the input node one quarter into the future** while retaining all other dimensions.

Use this function when you need last quarter's values alongside current data for quarter-over-quarter comparisons.

## Syntax

`PQ('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 quarter

Each value appears one quarter later in the result.

**Input node:** `'Profit'`

| Quarter | Value |
| ------- | ----- |
| 2025-Q1 | 35    |
| 2025-Q2 | 42    |
| 2025-Q3 | 47    |

**Formula:** `PQ('Profit')`

| Quarter | PQ Result |
| ------- | --------- |
| 2025-Q2 | 35        |
| 2025-Q3 | 42        |
| 2025-Q4 | 47        |

### Shifting values by two quarters (nested PQ)

Nesting PQ calls shifts values further into the future. Here, each value moves two quarters forward.
Try [SHIFT](/shift/) as an alternative with a custom offset.

**Input node:** `'Profit'`

| Quarter | Value |
| ------- | ----- |
| 2025-Q1 | 35    |
| 2025-Q2 | 42    |
| 2025-Q3 | 47    |

**Formula:** `PQ(PQ('Profit'))`

| Quarter | PQ Result |
| ------- | --------- |
| 2025-Q3 | 35        |
| 2025-Q4 | 42        |
| 2026-Q1 | 47        |

## Related Functions

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