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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dynamic date slicer that selects all months up to the current month

I have a date slicer that selects the month. Every month I go in and change the default to include all months up to the current month. So in March, the default for the slicer has January, February, and March included. I change the slicer default manually each month. I'm wondering if there is a DAX statement that can make the filter automatically select all months up to and including the current month. Thanks!

 

asodie_0-1673014679022.png

 

2 REPLIES 2
tmack99
Advocate II
Advocate II

The slicer can be made to automatically choose all months up to and including the current month by using a DAX statement, yes. To accomplish this, you must create a calculated column that first determines the current date using the TODAY() function and then returns the month of the current date using the MONTH() function. Then, using the FILTER() method, you can choose all entries with a month that is less than or equal to the one you are currently seeing. Last but not least, you can utilize this calculated column as the slicer's filter.

 

amitchandak
Super User
Super User

@Anonymous , I doubt that. You need a column like this in your table

 

if( month([Date]) <= month(today()), "Less than Current Month", format([date],"mmmm") )

 

and use that in filter

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.