Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

DAX Today Minus 1 Day, 1 Month and 1 Year in Power BI (TODAY, EDATE, MIN Date)

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:

OrderIDOrderDateRegionProductSalesRepSales
SO-102001/12/2026WestVisio Plan 2Rachel Morgan$1,440
SO-101401/21/2026EastWireless MouseTyler Brooks$49
SO-104803/07/2026EastProArt 32Dana Whitfield$4,823
SO-101103/18/2026WestThinkPad X1Brian Keller$11,592
SO-101307/29/2026CentralUSB-C DockBrian Keller$1,832
SO-103209/09/2026EastThinkPad X1Rachel Morgan$5,796

Each measure below starts the same way. On the Home tab, select New measure in the Calculations group:

Power BI Desktop Home ribbon with the New measure button 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:

Yesterday measure using TODAY minus 1 with the mm/dd/yyyy format in Power BI Desktop

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)
Today Minus 1 Month measure using EDATE with TODAY and -1 in Power BI

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)
Today Minus 1 Year measure using EDATE with TODAY and -12 in Power BI

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)
Today Minus 6 Months measure using EDATE with TODAY and -6 in Power BI

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
Day Before First Order measure subtracting 1 from MIN of the OrderDate column by region

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)
First Order Minus 1 Month measure using EDATE on MIN of OrderDate by region

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)
First Order Minus 1 Year measure using EDATE with -12 on MIN of OrderDate by region

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
    )
Sales Last 30 Days of Data measure using MAX of OrderDate minus 30 inside CALCULATE

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 wantDAXOur result (11/05/2026)
Today minus 1 dayTODAY() - 111/04/2026
Today minus 1 monthEDATE(TODAY(), -1)10/05/2026
Today minus 6 monthsEDATE(TODAY(), -6)05/05/2026
Today minus 1 yearEDATE(TODAY(), -12)11/05/2025
First date minus 1 dayMIN(Sales[OrderDate]) - 101/11/2026
First date minus 1 yearEDATE(MIN(Sales[OrderDate]), -12)01/12/2025
Shift a filter by a yearDATEADD('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, YEAR without 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.