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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
anmolmalviya05
Super User
Super User

Fix latest date in slicer from the dataset

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

3 ACCEPTED SOLUTIONS
Jonvoge
Super User
Super User

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

View solution in original post

Sergii24
Super User
Super User
Anonymous
Not applicable

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":

vyangliumsft_0-1731376196245.png

vyangliumsft_1-1731376196247.png

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:

vyangliumsft_2-1731376243156.png

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: 

vyangliumsft_3-1731376243161.png

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.

vyangliumsft_4-1731376266449.png

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

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":

vyangliumsft_0-1731376196245.png

vyangliumsft_1-1731376196247.png

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:

vyangliumsft_2-1731376243156.png

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: 

vyangliumsft_3-1731376243161.png

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.

vyangliumsft_4-1731376266449.png

 

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

Sergii24
Super User
Super User

Jonvoge
Super User
Super User

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors