PARALLELPERIODCalendarDate
PARALLELPERIOD is a Data Analysis Expressions (DAX) function used in Power BI, Excel Power Pivot, and SQL Server Analysis Services to shift the current date context by a specified number of time periods. It returns a table of dates that are parallel to the current period, allowing comparisons across time such as year-over-year or month-over-month analyses.
Syntax: PARALLELPERIOD(<dates>, <number_of_periods>, <interval>)
- <dates> is a column of date values that defines the calendar context, typically from a date dimension.
- <number_of_periods> is an integer indicating how many periods to shift; negative values move backward in time,
- <interval> is the time unit for the shift and can be YEAR, QUARTER, MONTH, or DAY.
How it works: PARALLELPERIOD produces a table of dates offset from the current filter context. It is
Example: To compute total sales for the same period last year, you might use:
CALCULATE(SUM(Sales[Amount]), PARALLELPERIOD('Date'[Date], -1, YEAR))
Limitations and considerations: The function relies on a well-defined date dimension and proper relationships to the