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
Delion
Helper IV
Helper IV

Remove current month from MTD

Delion_0-1614307097418.png

Hi how to remove current month from MTD filter list?

example: current month Feb 2021, in MTD filter list keep the last month is Jan 2021,

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Delion , Create a column like this and use that as a visual level filter

Month Type = Switch( True(),
eomonth([Date],0) <= eomonth(Today(),-1), 1,0
)

 

filter for 1

View solution in original post

v-rzhou-msft
Community Support
Community Support

Hi @Delion 

You can try my way to build a measure filter as well.

My Sample:

1.png

MTD and YearMonth are calculated columns. I build YearMonth column to sort MTD column.

Measure:

MTD Filter =
VAR _YearMonth =
    YEAR ( TODAY () ) * 100
        + MONTH ( TODAY () )
RETURN
    IF ( MAX ( 'Table'[YearMonth] ) < _YearMonth, 1, 0 )

Add this measure into Slicer's visual filter: 

2.png

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @Delion 

You can try my way to build a measure filter as well.

My Sample:

1.png

MTD and YearMonth are calculated columns. I build YearMonth column to sort MTD column.

Measure:

MTD Filter =
VAR _YearMonth =
    YEAR ( TODAY () ) * 100
        + MONTH ( TODAY () )
RETURN
    IF ( MAX ( 'Table'[YearMonth] ) < _YearMonth, 1, 0 )

Add this measure into Slicer's visual filter: 

2.png

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

amitchandak
Super User
Super User

@Delion , Create a column like this and use that as a visual level filter

Month Type = Switch( True(),
eomonth([Date],0) <= eomonth(Today(),-1), 1,0
)

 

filter for 1

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.