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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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