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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors