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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
ckwongak
Frequent Visitor

How to make slicer default showing latest month as the selection when new data come in every month?

I have a dashboard which contains a slicer for user to select different month of data, the data will refreshed monthly. However, I don't know how to make the slicer automatically pointing to the latest month after each refresh, is this possible to do so in Power BI?

3 ACCEPTED SOLUTIONS
MattAllington
Community Champion
Community Champion

What I normally do is add another column I'm the calendar table that mirrors a unique month column, eg mmm-yyyy.  Write a formula for the column (Power Query or DAX calc column, better in PQ, I think)) that returns "Current Month" for the active month and "mmm-yyyy" for the other months. Sort this on anothe unique month column such as mmm-yyyy or month end date. Once done, use this new column and set to "current month". Each month (during refresh), the actual current month changes but the slicer stays the same. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

wynhopkins
Most Valuable Professional
Most Valuable Professional

I have a 5 minute "Current Month Slicer" video here that might be be of use https://youtu.be/5dN4SqufENE

MVP | Author of Power BI for the Excel Analyst | Speaker | Power BI & Excel Developer & Instructor | YouTube- 5 million views | Fan of Power Query & XLOOKUP | Purpose: Making life easier for people through applying and sharing knowledge.

View solution in original post

Hi @ckwongak 
You can catch your selection with dax code :

selected period = "Selected period is " & min('Table'[Date]) & " - " & max('Table'[Date])
and to put it on a small card under the slicer:
Ritaf1983_0-1684723616422.png

If my answer was helpful please give me a Kudos and accept as a Solution.

 
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

7 REPLIES 7
ckwongak
Frequent Visitor

But is it possible to show the Actual date in yyyy-mm-dd instead of "Currnet Date"/"Latest Date"?

Hi @ckwongak 
You can catch your selection with dax code :

selected period = "Selected period is " & min('Table'[Date]) & " - " & max('Table'[Date])
and to put it on a small card under the slicer:
Ritaf1983_0-1684723616422.png

If my answer was helpful please give me a Kudos and accept as a Solution.

 
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

You will need to compromise, somewhere. You could put the new column i described in the filters pane and a card showing the actual date. I cannot think of a way to have a slicer showing the actual date AND allowing the user to select a different date. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.
wynhopkins
Most Valuable Professional
Most Valuable Professional

I have a 5 minute "Current Month Slicer" video here that might be be of use https://youtu.be/5dN4SqufENE

MVP | Author of Power BI for the Excel Analyst | Speaker | Power BI & Excel Developer & Instructor | YouTube- 5 million views | Fan of Power Query & XLOOKUP | Purpose: Making life easier for people through applying and sharing knowledge.
Ritaf1983
Super User
Super User

Hi @ckwongak ,
Assuming I understand your needs correctly, the following tutorial may help:
https://www.youtube.com/watch?v=JlVHsZUk1nc

If my answer was helpful please give me a Kudos and accept as a Solution.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
MattAllington
Community Champion
Community Champion

What I normally do is add another column I'm the calendar table that mirrors a unique month column, eg mmm-yyyy.  Write a formula for the column (Power Query or DAX calc column, better in PQ, I think)) that returns "Current Month" for the active month and "mmm-yyyy" for the other months. Sort this on anothe unique month column such as mmm-yyyy or month end date. Once done, use this new column and set to "current month". Each month (during refresh), the actual current month changes but the slicer stays the same. 



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Hello there, this solution works really well. However, I am wondering if you have a solution for default loading to CurrentMonth when accessing the Power BI Service? Currently, my slicer loads to the month when the pbix was published.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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