Previous month sales with DATEADD
Shift dates by any number of days, months, quarters or years, and show last month’s sales next to this month’s.
You will learn to
- Shift a date filter by a chosen interval with DATEADD
- Use a negative number to look back in time
- Tell DATEADD and PREVIOUSMONTH apart
How it works
`DATEADD('Date'[Date], number, interval)` is the general-purpose date shifter. It moves every visible date by the number of intervals you ask for: **DAY**, **MONTH**, **QUARTER** or **YEAR**. A negative number goes back in time.
So `DATEADD('Date'[Date], -1, MONTH)` turns April 2025 into March 2025. Like the other date functions, it returns a table of dates for `CALCULATE` to use as a filter.
There is also `PREVIOUSMONTH('Date'[Date])`, which returns the whole month before the **first** visible date. In a single-month row the two agree. They differ when more than a month is visible: for all of 2025, DATEADD shifts every day and returns December 2024 through November 2025, while PREVIOUSMONTH returns only December 2024.
Practice it hands-on with a real data model and a live report that updates as you type.
Sales 2 Months Ago = CALCULATE([Total Sales], DATEADD('Date'[Date], -2, MONTH))