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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.