Here’s a short description and example of PARALLELPERIOD()
in Power BI DAX:
🔁 What it does:
PARALLELPERIOD()
shifts the dates in the current context by a specified number of intervals (month, quarter, or year) — but keeps the same length of period.
🧮 Syntax:
PARALLELPERIOD(<dates>, <number of intervals>, <interval type>)
<dates>
→ a date column (e.g.,'DateTable'[Date]
)<number of intervals>
→-1
for previous,1
for next<interval type>
→"month"
,"quarter"
,"year"
🧮 Example: Previous Year Sales
Sales PY =
CALCULATE(
SUM(Sales[Sales]),
PARALLELPERIOD('DateTable'[Date], -1, YEAR)
)
📊 How it works:
Year | Month | Sales | Sales PY (ParallelPeriod -1 Year) |
---|---|---|---|
2025 | Jan | 24,000 | 22,000 (from Jan 2024) |
2025 | Feb | 15,800 | 13,000 (from Feb 2024) |
✅ Tip: Unlike SAMEPERIODLASTYEAR()
, PARALLELPERIOD()
doesn’t preserve day granularity — it just shifts the whole month/quarter/year.