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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
tangcy123
Helper I
Helper I

How to display current month's MTD for Year 2022 and Year2023, and hide the MTD for future date?

I want to remove the month slicer, how to display current month's MTD by month_day?e.g.: Today is March 9, I want to display the MTD of Year 2022 (from Mar 01 to Mar 31), also display MTD of Year 2023 (from Mar 01 till today Mar 09, hide the MTD for future date).

 

1. I have test data for orders, order_date have relationship with calendar Date Table.

tangcy123_0-1678352033002.png

2. Add a column for DateTable:  

BigthanLastOrderDate = 'DateTable'[Date] <= MAX(testdata[Order_date])
tangcy123_1-1678352227110.png
3. Add a measure for testdata table:
Current_History_MTD = TOTALMTD(SUM('testdata'[total_amount_usd_without_tax]),'DateTable'[Date],'DateTable'[BigthanLastOrderDate]=True)
tangcy123_2-1678352320158.png

4.  Create report with Month slicer and line chat as below:

 

MTD Issue.png

 

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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