Our sales dashboard needed three moving dates: yesterday, the same day last month and the same day last year. Each one is a single short DAX measure, but the month and year versions trip people up.
In this tutorial, we’ll show you the dax today minus 1 day formula and the month and year versions, all built in Power BI Desktop on a 2026 sales file. Then we’ll apply the same math to the first order date with MIN and sum the last 30 days of sales.
Quick answer: Subtract days with plain math, TODAY() - 1, because DAX stores dates as day numbers. Subtract months and years with EDATE: EDATE(TODAY(), -1) is one month back and EDATE(TODAY(), -12) is one year back. Swap TODAY() for MIN(Sales[OrderDate]) to do the same with any date.
What You Need Before You Start
- Power BI Desktop (we used the current version on 11/05/2026). No paid license is needed for Desktop.
- A table with a real Date column. Ours is Sales with an OrderDate column typed as Date.
- Two minutes per measure. Every formula here is a measure, so it reacts to the rows of the visual.
If you’re not sure whether something should be a measure or a column, our guide to calculated columns vs measures in Power BI explains the difference. Here we use measures throughout.
My demo file is a CSV of 60 orders from 01/12/2026 to 09/09/2026, loaded as a table named Sales. A few of the rows look like this:
| OrderID | OrderDate | Region | Product | SalesRep | Sales |
|---|---|---|---|---|---|
| SO-1020 | 01/12/2026 | West | Visio Plan 2 | Rachel Morgan | $1,440 |
| SO-1014 | 01/21/2026 | East | Wireless Mouse | Tyler Brooks | $49 |
| SO-1048 | 03/07/2026 | East | ProArt 32 | Dana Whitfield | $4,823 |
| SO-1011 | 03/18/2026 | West | ThinkPad X1 | Brian Keller | $11,592 |
| SO-1013 | 07/29/2026 | Central | USB-C Dock | Brian Keller | $1,832 |
| SO-1032 | 09/09/2026 | East | ThinkPad X1 | Rachel Morgan | $5,796 |
Each measure below starts the same way. On the Home tab, select New measure in the Calculations group:

A formula bar opens above the canvas. Type the measure, press Enter, and set its format on the Measure tools tab.
Step 1: Get Yesterday With TODAY() – 1
DAX stores a date as a number of days, so subtracting 1 moves it back exactly one day. TODAY() returns the current date at 12:00:00 AM, which keeps the result a clean date with no time part.
Yesterday = TODAY() - 1
After you press Enter, open Format on the Measure tools ribbon and pick mm/dd/yyyy, so the card shows a date and not a time stamp:

On 11/05/2026 the Yesterday column showed 11/04/2026. The value changes every day, but only when the report refreshes. For more ways to use the current date, see our Power BI DAX TODAY function guide.
To subtract more days, change the number: TODAY() - 7 is a week ago and TODAY() - 30 is 30 days ago.
Step 2: Subtract 1 Month From Today With EDATE
Months don’t have a fixed length, so TODAY() - 30 isn’t really “one month ago.” EDATE moves a date by whole months and keeps the day number. A negative number goes back in time:
Today Minus 1 Month = EDATE(TODAY(), -1)

Same report, same day: 11/05/2026 became 10/05/2026. The day stayed on the 5th, which is what most month-over-month reports expect.
Note: when the target month is shorter, Microsoft documents that EDATE returns its last day. By that rule, EDATE(dt"2026-03-31", -1) lands on 02/28/2026. If you’re building previous-month totals rather than a single date, see current month and previous month sales in Power BI.
Step 3: Subtract 1 Year (or 6 Months) From Today
There’s no separate “EYEAR” function. One year back is just 12 months back, so we use EDATE again:
Today Minus 1 Year = EDATE(TODAY(), -12)

The measure returned 11/05/2025, the same date one year earlier. Any other month count works the same way. Here’s six months back:
Today Minus 6 Months = EDATE(TODAY(), -6)

That one showed 05/05/2026. These dates make good lower bounds for filters, and they pair well with a month over month change measure when you compare periods.
Step 4: Subtract Days, Months and Years From the MIN Date
The same math works on any date, not just today. Here we start from the first order date, which is MIN(Sales[OrderDate]). If MIN on dates is new to you, our Power BI DAX MIN date guide covers it first.
Same Sales table, now in a table visual by Region. First, the day before each region’s first order:
Day Before First Order = MIN(Sales[OrderDate]) - 1

West’s first order was 01/12/2026, so the measure shows 01/11/2026. Central started later, on 06/20/2026, and shows 06/19/2026.
For one month back, wrap the MIN in EDATE:
First Order Minus 1 Month = EDATE(MIN(Sales[OrderDate]), -1)

East’s 01/18/2026 became 12/18/2025, so EDATE crossed into the previous year without any extra logic. One year back uses -12:
First Order Minus 1 Year = EDATE(MIN(Sales[OrderDate]), -12)

Every region moved back to the same day in 2025, and the Total row shows 01/12/2025 because it starts from the earliest order in the whole file. More MIN patterns are in the Power BI DAX MIN function tutorial.
Step 5: Sum Sales for the Last 30 Days
Subtracting days really pays off inside a filter. This measure adds up sales from the 30 days that end on the last order date:
Sales Last 30 Days of Data =
VAR LastOrderDay = MAX(Sales[OrderDate])
RETURN
CALCULATE(
SUM(Sales[Sales]),
Sales[OrderDate] > LastOrderDay - 30,
Sales[OrderDate] <= LastOrderDay
)

It returned $39,858 from 9 orders between 08/10/2026 and 09/09/2026. We used the last order date instead of TODAY() because the demo data stops on 09/09/2026, so a window ending today would be empty. The Power BI DAX MAX date guide explains that MAX part.
On live data that keeps loading new rows, the TODAY() version is the usual choice. We didn’t run this one on the demo file:
Sales Last 30 Days =
CALCULATE(
SUM(Sales[Sales]),
Sales[OrderDate] > TODAY() - 30,
Sales[OrderDate] <= TODAY()
)
Where DATEADD Fits (and Why It Needs a Date Table)
DATEADD looks like the obvious choice, but it doesn’t return a single date. It returns a table of dates shifted by a number of days, months, quarters or years, and only dates that exist in the column you pass in.
That’s why it belongs inside CALCULATE with a proper date table, as in this Learn-style pattern (we didn’t build a date table for this demo):
Sales Same Period Last Year =
CALCULATE(SUM(Sales[Sales]), DATEADD('Date'[Date], -1, YEAR))
Microsoft also notes that the dates in the current context must be contiguous, or DATEADD returns an error. If you don’t have a date table yet, create a calendar table with the DAX CALENDAR function first.
DAX Date Minus Cheat Sheet
| You want | DAX | Our result (11/05/2026) |
|---|---|---|
| Today minus 1 day | TODAY() - 1 | 11/04/2026 |
| Today minus 1 month | EDATE(TODAY(), -1) | 10/05/2026 |
| Today minus 6 months | EDATE(TODAY(), -6) | 05/05/2026 |
| Today minus 1 year | EDATE(TODAY(), -12) | 11/05/2025 |
| First date minus 1 day | MIN(Sales[OrderDate]) - 1 | 01/11/2026 |
| First date minus 1 year | EDATE(MIN(Sales[OrderDate]), -12) | 01/12/2025 |
| Shift a filter by a year | DATEADD('Date'[Date], -1, YEAR) | Table of dates, use in CALCULATE |
Common Mistakes to Avoid
- Using TODAY() – 30 for one month. It drifts because months have 28 to 31 days. Use EDATE with -1.
- Building last year with DATE(YEAR(TODAY()) – 1, …) and MONTH() – 1. Microsoft’s DATE docs say negative months and days aren’t supported, so January breaks. EDATE handles the year change for you.
- Putting DATEADD in a card on its own. It returns a table, not one date. Use it as a CALCULATE filter, or use EDATE for a single date.
- Quoting the interval. In DATEADD, YEAR, MONTH and DAY are keywords, not text, so write
-1, YEARwithout quotes. - Expecting TODAY() to change on its own. It only moves when the report or semantic model refreshes, so check your refresh schedule.
Can You Subtract 1 Day From a Date in Power Query Instead?
Yes. If you’d rather store the shifted date as a column, Power Query’s Date.AddDays takes a negative number, for example Date.AddDays([OrderDate], -1). We didn’t run it in this demo. Our Power Query date functions guide shows where to add a custom column.
Next Steps
Once you can move a date back, the next question is usually “how many days between them?” Our DATEDIFF in Power BI DAX tutorial covers that, and you’ll find the rest of our DAX walk-throughs on the Power BI tutorials page.
We use these date and MIN/MAX guides alongside the measures above:
Frequently Asked Questions
How do I get today minus 1 day in DAX?
Create a measure with Yesterday = TODAY() – 1 and set its format to a date such as mm/dd/yyyy. On 11/05/2026 it returned 11/04/2026. It updates whenever the report refreshes.
How do I subtract 1 year from today in Power BI DAX?
Use EDATE(TODAY(), -12). EDATE moves a date by whole months, so -12 gives the same day one year earlier. On 11/05/2026 our measure showed 11/05/2025.
How do I subtract 1 month from a date in DAX?
Use EDATE(date, -1), for example EDATE(TODAY(), -1) or EDATE(MIN(Sales[OrderDate]), -1). If the day doesn’t exist in the earlier month, EDATE returns that month’s last day, as the Microsoft Learn EDATE reference explains.
How do I subtract days from a date column in DAX?
Subtract a number from the date, such as MIN(Sales[OrderDate]) – 7 in a measure or Sales[OrderDate] – 7 in a calculated column. DAX stores dates as day numbers, so the result is still a date.
Should I use DATEADD or EDATE for date minus 1 year?
Use EDATE when you need one date. Use DATEADD inside CALCULATE when you want to shift a whole filter, like last year’s sales, and you have a date table with contiguous dates. The DATEADD reference on Microsoft Learn lists those rules.

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.