Downloads
DAXTime intelligence: shift and compareIntermediate

DATEADD

Shifts the dates in the filter context by a number of days, months, quarters or years.

Syntax
DATEADD(<dates>, <number_of_intervals>, <interval>), where interval is DAY, MONTH, QUARTER or YEAR

Returns: A table of dates.

What it does

DATEADD moves each visible date by a set number of intervals. A negative number moves dates back. Finance teams use it to compare a month with the prior month, a quarter with the prior quarter, and a period with the same period a year earlier. Inside CALCULATE, the shifted dates become the new filter, so the measure is recalculated for the earlier period.

Syntax and arguments

Example

A monthly revenue report needs the prior month and the prior quarter next to the current figure.

Revenue Prior Month = CALCULATE([Total Revenue], DATEADD('Calendar'[Date], -1, MONTH))

Revenue Prior Quarter = CALCULATE([Total Revenue], DATEADD('Calendar'[Date], -1, QUARTER))

In the October 2026 row, Revenue Prior Month adds up September 2026 and Revenue Prior Quarter adds up July through September 2026. Both use the visible dates, so a month row always compares a full month with a full month.

Example: a second, different use

Revenue for the same quarter last year, shown next to the current quarter in a quarterly table.

Revenue Same Quarter LY = CALCULATE([Total Revenue], DATEADD('Calendar'[Date], -1, YEAR))

In a Q4 2026 row, this measure adds up Q4 2025.

Things to watch

In business terms

DATEADD supports month-over-month and quarter-over-quarter reviews, rolling comparisons, and any check that needs the same period a set distance earlier. Controllers use it in variance commentary, where the question is always "compared with what?"

Related functions

All DAX functions · View as Markdown · DAX fundamentals