PQ
Category: Compare periods
Overview
| Description | Shifts the input node 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. |
| Syntax | PQ('Node') |
| Parameters | Node: Input node that is shifted, specified using the node name in single quotes (e.g. 'Profit') |
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 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 | When you need the previous year instead of the previous quarter. |
| SHIFT | When you need a custom offset or want to shift along a specific time level. |
| QOQ_ABS | When you need the absolute difference to the previous quarter, not just the shifted values. |