Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
ERing
Post Partisan
Post Partisan

Need measure for MTD up to Prior Day

I have a requirement to show [Total_Sales] for the current month up to the Prior Day. My report will not have a date slicer or any Date context in the visuals.

 

For example, today is May 12th, 2025. I need the measure to show [Total_Sales] from May 1st, 2025 - May 11, 2025. When we reach May 18th, 2025, the measure should show [Total_Sales] between May 1st, 2025 - May 17th, 2025.

1 ACCEPTED SOLUTION
techies
Super User
Super User

Hi @ERing As i understand, MTD value up to yesterday, please check this measure

 

MTD Total Sales - Up to Prior Day =
VAR TodayDate = TODAY()
VAR Monthstart = DATE(YEAR(TodayDate), MONTH(TodayDate), 1)
VAR EndDate = TodayDate - 1

RETURN
CALCULATE(
    SUM('cases'[Value]),
    DATESBETWEEN(
        'Date'[Date],
        Monthstart,
        EndDate
    )
)
Power BI & Microsoft Fabric
PL-300 | DP-600 | DP-700 Certified

View solution in original post

3 REPLIES 3
techies
Super User
Super User

Hi @ERing As i understand, MTD value up to yesterday, please check this measure

 

MTD Total Sales - Up to Prior Day =
VAR TodayDate = TODAY()
VAR Monthstart = DATE(YEAR(TodayDate), MONTH(TodayDate), 1)
VAR EndDate = TodayDate - 1

RETURN
CALCULATE(
    SUM('cases'[Value]),
    DATESBETWEEN(
        'Date'[Date],
        Monthstart,
        EndDate
    )
)
Power BI & Microsoft Fabric
PL-300 | DP-600 | DP-700 Certified

@techies 

Yes, this appears to be working.  And just to confirm, this will adjust with new months into the future, correct? For example, when we reach June 2, this will provide data for June 1?

yes

Power BI & Microsoft Fabric
PL-300 | DP-600 | DP-700 Certified

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.