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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
EMSSS22
Helper I
Helper I

Dynamic Date slicer with text and blanks

I have a slicer where I want it to always defult to todays date so i created a calculated column:
 

dimDate = IF([Start]=Today(),"Today",IF([Start]>TODAY(),[Start]&""))

However, I want to sort this column so that when user clicks on the dropdown is able to find other dates in ascending order I just get random dates and when I do try sort by my 'Start' Date column it gives me the following error attached. I have found a youtube video on this but can't get it to work with his recommended suggestions. Any other ideas?

https://www.youtube.com/watch?v=VaJ10ilXp6Y
EMSSS22_0-1676558041299.pngEMSSS22_1-1676558129224.png

 

 

2 ACCEPTED SOLUTIONS
marcelsmaglhaes
Super User
Super User

Hi @EMSSS22 !

 

If you change the DAX to something like bellow and of course sort the column is_today by date, should work.

marcelsmaglhaes_0-1676560637511.png

marcelsmaglhaes_1-1676560671531.png

 

 


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!
Imagem de fundo



View solution in original post

If you want to see dates >= today, so you can put the dates column on visual filters and use relative date like the image.

marcelsmaglhaes_0-1676564079844.png

 




Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!
Imagem de fundo



View solution in original post

5 REPLIES 5
marcelsmaglhaes
Super User
Super User

Hi @EMSSS22 !

 

If you change the DAX to something like bellow and of course sort the column is_today by date, should work.

marcelsmaglhaes_0-1676560637511.png

marcelsmaglhaes_1-1676560671531.png

 

 


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!
Imagem de fundo



That's great thank you! How do I keep in that I only want to see dates after TODAY() - my dataset has dates 

This part: IF([Start]>TODAY(),[Start]&""

If you want to see dates >= today, so you can put the dates column on visual filters and use relative date like the image.

marcelsmaglhaes_0-1676564079844.png

 




Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!
Imagem de fundo



Amazing thank you!

sudhav
Helper V
Helper V

Why dont you try this relative date slicer to select defaul date dynamically.

 

sudhav_0-1676559819226.png

 

If I answered your question, please accept is as solution and give kudos!

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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