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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
common763
Helper III
Helper III

Special Date Filter Sort Inquiry

I have a date filter in my power bi report.  The end-user wants it to display all dates, but only show data for one at a time due to the model.  The data refreshes daily so I cannot select most recent date.  I did the following which works.

 

DateSlicer = if('TABLE'[DATE]='TABLE'[Max_Date],"1-Most Recent Date", 'TABLE'[DATE] & "")
 
This actually works.  I then take this new column and drop into the slicer.  The problem is when it converts to text.  We have a new text for Most Recent Date and then actual dates converted to text.  When I sort the slicer, Most recent date goes to the bottom of the slicer and the dates dont sort properly anyway.  Is there an easy way to have the end user have most recent date auto-selected with each refresh and sorted at top?  Bascially how do I use the above formula, then have it sort properly.  Any help much appreciated.  Thanks. 

 

 

1 ACCEPTED SOLUTION
common763
Helper III
Helper III

This can be closed.  This video explains it and was easier than I thought.  I left the column as is with TEXT format.  Then sorted by column in the formula by the actual date column.  Here is a vid explaining it.  Thanks for your help.  Appreciate it. 

 

How to set a DATE SLICER to TODAY by default in Power BI

View solution in original post

3 REPLIES 3
common763
Helper III
Helper III

This can be closed.  This video explains it and was easier than I thought.  I left the column as is with TEXT format.  Then sorted by column in the formula by the actual date column.  Here is a vid explaining it.  Thanks for your help.  Appreciate it. 

 

How to set a DATE SLICER to TODAY by default in Power BI

lbendlin
Super User
Super User

instead of "1-" use " "  (a single space).  If Power BI gets cute and trims that, use any other character that comes before "1".

 

You would also want to format your dates in sortable way, like "YYYY-MM-DD".

THe first part fixes the sort but now I have two different variant types in the column.  1 is the 0-Most Recent which will automatically have the slicer adjusted to the recent day on refresh.  Then the dates are all text.  I cannot convert them in this column.  I just want an easy way for the data to refresh and have the slicer single select the most recent date on daily refresh.  The only way I saw this done was to give it a name like 0-Most Recent but now it is causing other issues.  

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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