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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
kristel_tulio
Helper III
Helper III

Compute this year MTD and previous year MTD based on selected Year filter

Hi, I would like to ask for help to modify my calc. I would like to get the MTD based on selected Year filter. My measure doesn't work when I selected the previous Year but it's working fine for this Financial year.

Ex. If today is October 18, 2022 then I would get last year October 18, 2021 and also for other year. I have two tables first one is Estimate Summaries - it has values and Date. I also have

Date table - i used the filter from this tablesample mtd1.PNG

2 REPLIES 2
kristel_tulio
Helper III
Helper III

Hi @v-easonf-msft 

Thank you for your reply, but that calc won't work on my end when I selected the previous year it returns blank values. It's working fine if it's current year

kristel_tulio_3-1666225207407.png

 

 

v-easonf-msft
Community Support
Community Support

Hi, @kristel_tulio 

If you have a calendar table, please try formula like:

MTD =
CALCULATE(
    sum('EstimateSummaries'[Values]),
    DATESMTD( CalendarTable[Date] )
)

Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.