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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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 | Blog: medium.com/@cseprs_54978

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 | Blog: medium.com/@cseprs_54978

@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 | Blog: medium.com/@cseprs_54978

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors