Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi everyone, I have a requirement that in the date slicer I want to set the default state to be the max date selected, but the end user should be able to select other date ranges if they want to, and also they should be able to select multiple dates.
How to achieve this
Solved! Go to Solution.
Hi
The general solution for this, is to create a new column in your data model which dynamically labels the current date as "Current Date", and to set your slicer to that value when you publish the report.
See other topics on this:
How to show latest date as default selection in a ... - Microsoft Fabric Community
_____________________________________________________
I hope my comment was helpful.
If your question was answered, please mark your post as 'Solved' and consider giving me a 'Thumbs Up'.
Find me on LinkedIn, Sessionize, or my blog Downhill Data
Hi @anmolmalviya05, take a look at this thread - Solved: Re: How to set default MAX date in Slicer - Microsoft Fabric Community
Thanks for the reply from Sergii24 and Jonvoge , please allow me to provide another insight:
Hi @anmolmalviya05 ,
You can consider using the “Preselected Slicer” custom visual to set the default selected state, as well as normal multi-selected values.
We can get the three point in the "Visualizations", and we click the "Get more visual":
Here are the steps you can follow:
First , we need to create a table with one column , and the value is True and False, like this:
Second , we can create a measure to define which the date we need to default preselected. If we need to default preselect then we return True else return False.
Flag =
VAR _date =
SELECTEDVALUE ( 'Table'[Date] )
VAR _max_date =
MAXX(ALL('Table'),[Date])
RETURN
IF ( _date = _max_date, TRUE (), FALSE () )
Then we can put the 'Table'[Date] in the Fields , [Flag] in the Pre Selection , 'Dirty Table'[Dirty Status] in the Dirty Status, like below screenshot:
We can then dynamically pre-select the latest date in the slice visualization by default, and when we select another date, simply click the red reset button in the upper right corner to restore the default selection.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for the reply from Sergii24 and Jonvoge , please allow me to provide another insight:
Hi @anmolmalviya05 ,
You can consider using the “Preselected Slicer” custom visual to set the default selected state, as well as normal multi-selected values.
We can get the three point in the "Visualizations", and we click the "Get more visual":
Here are the steps you can follow:
First , we need to create a table with one column , and the value is True and False, like this:
Second , we can create a measure to define which the date we need to default preselected. If we need to default preselect then we return True else return False.
Flag =
VAR _date =
SELECTEDVALUE ( 'Table'[Date] )
VAR _max_date =
MAXX(ALL('Table'),[Date])
RETURN
IF ( _date = _max_date, TRUE (), FALSE () )
Then we can put the 'Table'[Date] in the Fields , [Flag] in the Pre Selection , 'Dirty Table'[Dirty Status] in the Dirty Status, like below screenshot:
We can then dynamically pre-select the latest date in the slice visualization by default, and when we select another date, simply click the red reset button in the upper right corner to restore the default selection.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @anmolmalviya05, take a look at this thread - Solved: Re: How to set default MAX date in Slicer - Microsoft Fabric Community
Hi
The general solution for this, is to create a new column in your data model which dynamically labels the current date as "Current Date", and to set your slicer to that value when you publish the report.
See other topics on this:
How to show latest date as default selection in a ... - Microsoft Fabric Community
_____________________________________________________
I hope my comment was helpful.
If your question was answered, please mark your post as 'Solved' and consider giving me a 'Thumbs Up'.
Find me on LinkedIn, Sessionize, or my blog Downhill Data
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.