Back to Roadmap
Level 4 — Time Intelligence+75 XP
Lesson 3

3. The Versatile DATEADD

Shift dates by any interval: Days, Months, Quarters, or Years.

The Concept

DATEADD allows custom shifts forward or backward: DATEADD(Dates, NumberOfIntervals, Interval).
Example DAX:
Sales 3 Months Ago = 
CALCULATE(
    [Total Revenue],
    DATEADD('Date'[Date], -3, MONTH)
)

DATEADD is far more flexible than built-in shortcuts because you can specify negative or positive values across DAY, MONTH, QUARTER, or YEAR.

Try It Yourself

Calculate Sales for the previous month using DATEADD with -1 and MONTH.

fx
[fx]The Versatile DATEADD=
Loading DAX Formula Studio...
Type [ for fields