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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Prasad23
Frequent Visitor

How to show latest date as default selection in a slicer.

Hi Team,

 

Please help me out with this query.

How to show latest date as default selection in a slicer.

 

For Example, we have a date column contains date from 01-10-2022 to 22-12-2023. So, when i  drag to slicer i need to show defalut selection as 22-12-2023.
If user need to select other date he need select. otherwise it should be default.

 

Thanks & Regards,

Prasad

13 REPLIES 13
alex_powerbi_20
New Member

Same as the first two replies - I am unable to follow part 3 as I'm unable to locate a "Default value field":

 

  1. Set Default Slicer Selection: Now, go to the Visualizations pane, find your slicer, and drag the "DefaultSelection" measure to the "Default value" field. This will set the default selection of the slicer to the latest date.

Bozintheuk1
Regular Visitor

I agree with @powerBIuser2937 .  I dont see a "Default value" field.  All the other steps work just fine!

 

@123abc Can you help to clarify since I am not the only one that doesnt see this.

powerBIuser2937
Frequent Visitor

can you explain point 3 in more details? I dont find the default value field not. Or do you mean drag and drop additionally to calculated column field the measure?

 

His answer has a chat GPT pattern. That won't help you, there is no default value field

@abc123 Why would you do this? Please don't post misinformation - this really is unhelpful to the community. If you insist on using GPT to augment your brain, at least fact check the results first. <reported to moderator>.

Hello @IanTCC,

Thank you for letting us know.  The response has been removed from this post.  We appreciate your contributions.

 

Best,

Natalie H.

Community Manager 

123abc
Community Champion
Community Champion

You are right but its my old post now i am not useing GPT and AI tools and if used any AI tool then mentioned the source. But i extremely apologies for this inconvenience.

Agreed. 

It seems @abc123 is taking the LAZY way out.

@abc123  should have at least tried to verify any AI content before using it.



Proud to be a Super User!

daxformatter.com makes life EASIER!
123abc
Community Champion
Community Champion

You are right but its my old post now i am not useing GPT and AI tools and if used any AI tool then mentioned the source. But i extremely apologies for this inconvenience.

Prasad23
Frequent Visitor

Hi @123abc ,

Thank you,
 I didn't understand this point,

 

     Set Default Slicer Selection: Now, go to the Visualizations pane, find your slicer, and drag the "DefaultSelection" measure to the "Default value" field. This will set the default selection of the slicer to the latest date.
Could you please explain this point where i need to keep this "DefaultSelection" measure.

Regards,
Prasad



v-xuxinyi-msft
Community Support
Community Support

Hi @Prasad23 

 

Maybe this method will help you.

 

Sample:

 

vxuxinyimsft_2-1706755305792.png

 

Then I created a calculated column as follows.

Date1 = IF('Table'[Date] = MAX('Table'[Date]), "Latest Date", FORMAT('Table'[Date], "MM-DD-YYYY"))

 

Then use this newly created column in the slicer.

vxuxinyimsft_1-1706754706856.png

Select Latest Date to automatically select the latest date when adding new data to the table.

 

When I didn't update the data:

vxuxinyimsft_3-1706755362724.png

 

 

When I updated the data:

vxuxinyimsft_4-1706755520334.png

 

vxuxinyimsft_5-1706755541829.png

Is this the result you expect?

 

Best Regards,
Community Support Team _Yuliax

 

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

Hi @v-xuxinyi-msft ,

 

Thank you, Is there anyway can we get instead of "latest date" text  to Date value.

Like "Latest Date" replaces with 12/23/2023.

Regards,
Prasad
 

Hi 

 

I edited the example from 'v-xuxinyi-msft' above to format the MAX value isntead of returning TEXT in the iftrue part of the IF function, example below:

 

Date1 = IF('Table'[Date] = MAX('Table'[Date]), FORMAT(MAX('Table'[Date]), "MM-DD-YYYY"), FORMAT('Table'[Date], "MM-DD-YYYY"))

 

This works for me and defaults the max value to the date format I require.

 

Regards

 

AJ

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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