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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
MacJasem
Helper III
Helper III

How to set a default selection on your date slicer, that is Dynamic.

Hi all

I've got this month slicer on a report page that shows the Months from my date table, then i've entered a Page filter so that it only shows the Months in this year, and this slicer expands as we move into new months of the year. 

I wish to have the last/newest month selected per default in the Month slicer. 

Any ideas on how i can set a default selection on my Month Slicer, that is always the last available month on the slicer?

3 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @MacJasem 

if you don't need the list of months you can use form option of "related date" on slicer :

Ritaf1983_0-1696690411028.png

if you are working with a month list you can use the linked workaround :
https://www.youtube.com/watch?v=5dN4SqufENE

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

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

Hi @MacJasem 
1. you need to have the "current month" ( not its name ) that is exactly what the video tutorial shows how to modify. 
Then you click on it when you publish or select from the list and it will be kept.
The second option - it seems you put the month column and not the date column to the slicer:

Ritaf1983_0-1696703187339.png

you need to put there column with date data type ( not string)

 

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

 

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

Anonymous
Not applicable

Hi @MacJasem 

You can use the customm visual:preselected slicer, it can set the dafault selection.

vxinruzhumsft_0-1697174356015.png

You can refer to the following sloution.

1.You need to create a table to set the true or false value.

vxinruzhumsft_1-1697174536035.png

 

2.Then you can create a measure to select the max month

Measure = var a=MAXX(ALLSELECTED('Table'),[Month])
return IF(SELECTEDVALUE('Table'[Month])=a,TRUE(),FALSE())

3.Then put the meaure and the true/false table to the slicer field

vxinruzhumsft_2-1697174823951.png

 

Output

vxinruzhumsft_3-1697174835370.png

Best Regards!

Yolo Zhu

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

4 REPLIES 4
Anonymous
Not applicable

Hi @MacJasem 

You can use the customm visual:preselected slicer, it can set the dafault selection.

vxinruzhumsft_0-1697174356015.png

You can refer to the following sloution.

1.You need to create a table to set the true or false value.

vxinruzhumsft_1-1697174536035.png

 

2.Then you can create a measure to select the max month

Measure = var a=MAXX(ALLSELECTED('Table'),[Month])
return IF(SELECTEDVALUE('Table'[Month])=a,TRUE(),FALSE())

3.Then put the meaure and the true/false table to the slicer field

vxinruzhumsft_2-1697174823951.png

 

Output

vxinruzhumsft_3-1697174835370.png

Best Regards!

Yolo Zhu

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

 

 

Ritaf1983
Super User
Super User

Hi @MacJasem 

if you don't need the list of months you can use form option of "related date" on slicer :

Ritaf1983_0-1696690411028.png

if you are working with a month list you can use the linked workaround :
https://www.youtube.com/watch?v=5dN4SqufENE

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

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

Hi @Ritaf1983 

Thanks for the input👍

But that is not really what i'm looking for. 
I already have set up the calculations to handle the dates as in the youtube video you linked to, but the only thing that i'm missing is how to set the default selection of the slicer to dynamically be the last date available in the slicer.

So now the last month of the slicer is October, and i've clicked on October to select the month. I'd like the selection to be done by default and dynamically change to the last month in the slicer. So that next month when we enter November, the slicer will be extended with a new month and that month should now be selected by default.

MacJasem_0-1696695591036.png

Any idea on how to do so?


BTW.
- in your screenshot you have the option to chose the slicer to be a relative view, and that's not the case in my desktop🤷‍♂️

MacJasem_1-1696695900938.png

 

Hi @MacJasem 
1. you need to have the "current month" ( not its name ) that is exactly what the video tutorial shows how to modify. 
Then you click on it when you publish or select from the list and it will be kept.
The second option - it seems you put the month column and not the date column to the slicer:

Ritaf1983_0-1696703187339.png

you need to put there column with date data type ( not string)

 

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

 

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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