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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Slicer default to latest date of a column

Hi All,

I am trying to have the default date of the slicer to latest date of the column and it should have option to select different date later if user wants. The data of the column changes everyday & adds latest dates. I am struck. Can you please help?

1 ACCEPTED SOLUTION

@Anonymous So, it sounds like you want this:

Column = IF([Date]=TODAY(),"Today",[Date]&"")

Then you would need to set the slicer to "Today" and save the report. Now Today will always be the default in the report and what rows are "Today" will change over time as the data is refreshed. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

6 REPLIES 6
v-shex-msft
Community Support
Community Support

Hi @Anonymous, 

I think Greg_Deckler 's format should suitable for your requirement.
I modify his formula to compare with the last date form your table and marked it as 'last'.  You can use this as the source of slicer, The '.last' option will be fixed on the top of the slicer lists and recalculated when your table records changes.

Marked =
IF ( [date] = MAXX ( ALL ( Table ), [date] ), ".Last", [date] & "" )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Greg_Deckler
Super User
Super User

@Anonymous You can use a relative date slicer or create a column that identifies "current" and "other" and add add a slicer for that.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  Thanks for the reply. I am looking for single selection slicer & default date. 

@Anonymous So, it sounds like you want this:

Column = IF([Date]=TODAY(),"Today",[Date]&"")

Then you would need to set the slicer to "Today" and save the report. Now Today will always be the default in the report and what rows are "Today" will change over time as the data is refreshed. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Anonymous , You have no option to do that, You can create a column like this and use that in filter

 

Date Type =
SWITCH(TRUE(),
'Date'[Date] = TODAY(), "Today",
'Date'[Date] = TODAY() -1 , "Yesterday",
[Date]& "")

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak  Thanks! I can create a column but it will not be defaulted to latest. 

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 MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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