Interactivity: Slicers, Sync Slicers & Visual Interactions
Overview & Learning Objectives
One of the most confusing subtleties in DAX is the distinction between `DATEADD()` and `PARALLELPERIOD()`. Both appear to shift dates back in time, but they behave radically differently when filtered to partial periods. `DATEADD` preserves the exact day-level selection, while `PARALLELPERIOD` always expands to grab the ENTIRE full calendar period (whole year, whole quarter, or whole month).
- Contrast the behavior of `PARALLELPERIOD` and `DATEADD` on partial periods.
- Understand how `PARALLELPERIOD` expands to full calendar boundaries.
- Use `PARALLELPERIOD` to calculate "% of Entire Prior Year Sales".
Industry Standard
Standard: Analytics teams at Amazon and Deloitte mandate using `DATEADD` for like-for-like daily/monthly comparisons, reserving `PARALLELPERIOD` for full-period benchmark comparisons.
Real-World Example: Spice Delight Cloud Kitchen
On March 15, Spice Delight evaluates sales. DATEADD compares against March 1-15 last year; PARALLELPERIOD compares against the ENTIRE full year.
| Filter Context | Function Used | Period Evaluated | Business Meaning |
|---|---|---|---|
| March 1 - 15, 2026 | DATEADD(Date, -1, YEAR) | March 1 - 15, 2025 | Like-for-like 15-day comparison |
| March 1 - 15, 2026 | PARALLELPERIOD(Date, -1, YEAR) | Jan 1 - Dec 31, 2025 (Full Year!) | Compares current partial period against full annual total |
Functions Covered in this Chapter
Here is the definition, exact syntax, parameter breakdown, and real-world business example for each function covered in this chapter:
PARALLELPERIOD Function
Definition: Returns a table of dates representing a complete parallel period (entire month, quarter, or year) shifted in time, ignoring the specific sub-dates selected.
Full Prior Year Sales = CALCULATE([Total Sales], PARALLELPERIOD(Dim_Date[Date], -1, YEAR))
Dates: Date column from a marked Date dimension.NumberOfIntervals: Number of periods to shift (e.g. -1).Interval: Granularity: `MONTH`, `QUARTER`, or `YEAR`.
Entire Prior Year = CALCULATE([Total Sales], PARALLELPERIOD(Dim_Date[Date], -1, YEAR))DATEADD Function (Strict Horizon)
Definition: Shifts dates by exact intervals while strictly preserving the exact subset of days currently filtered in the visual.
Exact Prior Year Window = CALCULATE([Total Sales], DATEADD(Dim_Date[Date], -1, YEAR))
Dates: Date column from a marked Date dimension.NumberOfIntervals: Number of periods to shift (e.g. -1).Interval: Granularity: `DAY`, `MONTH`, `QUARTER`, or `YEAR`.
Prior Year Same Day = CALCULATE([Total Sales], DATEADD(Dim_Date[Date], -1, YEAR))Common Mistakes & Limitations
- Using `PARALLELPERIOD` in a daily trend chart expecting like-for-like daily comparisons; it will repeat the full monthly total across every day.
- Assuming `PARALLELPERIOD` respects partial month slicers.
Keyboard Shortcuts
| Action | Windows | Mac |
|---|---|---|
| Create Measure | Alt -> Modeling -> New Measure | New Measure |
| Format Currency | Measure Tools -> Currency | Currency |
Pro Tips & Modern Alternatives
- Always use `DATEADD` when you want the shifted window to match the exact duration and shape of the current selection.
- Use `PARALLELPERIOD` when calculating what percentage the current month represents of the entire previous quarter.