DAX PARALLELPERIOD Function
Create a table of dates shifted by specified intervals in DAX.
PARALLELPERIOD returns a table of dates shifted by a specified number of intervals parallel to
the current context but ignores the filter context on smaller time units.
Syntax
PARALLELPERIOD(<dates>, <number_of_intervals>, <interval>)
<dates>: A column containing dates, typically from a Date table.<number_of_intervals>: Number of intervals to shift (can be positive or negative).<interval>: The interval type:"DAY","MONTH","QUARTER", or"YEAR".
How It Works
- Shifts the time period exactly by the number of intervals specified, ignoring filters on smaller date parts.
- Useful when you want to compare the same period in a different year or month but keep the same granularity.
Example
Calculate sales for the same period last year:
Sales Same Period Last Year :=
CALCULATE(
[Total Sales],
PARALLELPERIOD('Date'[Date], -1, YEAR)
)
Difference Between PARALLELPERIOD and DATEADD
| Feature | PARALLELPERIOD | DATEADD |
|---|---|---|
| Filters on smaller units | Ignores filters on smaller date parts | Respects filters on smaller date parts |
| Use case | Shift by full periods (month, quarter, year) | Shift by flexible intervals, including partial periods |
| Behavior | Shifts parallel periods (e.g., same days in previous month) | Shifts by exact number of intervals, including days |
No questions available.