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

Win a FREE 3 Day Ticket to FabCon Vienna. Apply now

Reply
Tanushree_Kapse
Impactful Individual
Impactful Individual

Current Year Months in Month Slicer

Hello All,,

 

I have a Month slicer, wherein I have pulled Month from the Date hierarchy.
This slicer is showing all the Months from Jan to Dec.
Because I have dates from Jan 2020 till April 2021

In the slicer I just want to show the current year Months... which are Jan to April.

The Top N filter for Year is not working on this.

How can I do that?

Please help!

3 REPLIES 3
Anonymous
Not applicable

You can create a filtered table from your date table containing the dates only for the current year like so 

 

Current year dates = FILTER(Sheet1,Sheet1[Date].[Year] = YEAR(TODAY()))

 

Then you can extract the month from the date using the format function on date 

 

Month Name = FORMAT('Current year dates'[Date],"MMMM")

 

Now when you use this calculated column in your slicer, you'll get only the months present in your date table for the current year dynamically without applying any filters manually as you asked.

 

Aditya_Meshram_1-1627465530117.png

 

Regards,

Aditya

 

 

CNENFRNL
Community Champion
Community Champion

Use a visual level filter

Screenshot 2021-07-27 155055.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

@CNENFRNL , in this case I'll have to manually select the Current Year every time.
Can I not do it dynamically?..the slicer should display current year's months at all times.

 

Thanks!

 

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.