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
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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.