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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jaime_FOS
Regular Visitor

Default to today's date

Hi,

 

I'm trying to figure out a way of filtering all the visuals on a page to default to today's date. I know that you can add this as a relative date filter, but if I do that, then I'm not able to select any other date besides today.

 

After some searching on Google and YouTube, I was able to create a measure that checks whether a date is 'today' or 'other date', and then add that into the report page as a slicer. However, you still have to pick 'other date' in order for other dates to be viewable. 

 

Ideally, what I'm trying to achieve is for the report to default to today, without it restricting other dates from being picked, without having to use the slicer as a way of picking between the 2 options. Can anyone please help?

 

Thanks in advance! 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Jaime_FOS ,

 

This may help you:

http://littledumbo.com/2019/05/23/how-to-set-default-value-for-slicers-in-power-bi-using-dax/ 

 

Best Regards,
Liang
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
V-lianl-msft
Community Support
Community Support

Hi @Jaime_FOS ,

 

This may help you:

http://littledumbo.com/2019/05/23/how-to-set-default-value-for-slicers-in-power-bi-using-dax/ 

 

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

This worked perfectly! Thanks very much for your help 🙂

amitchandak
Super User
Super User

@Jaime_FOS ,

 

You can have a column like this

Is Today = if('Date'[Date]=TODAY(),"Today",[Date]&"")  //it will add date as text. if required use format to get date in a desired format

 

And sort this on the date column. As it derived from date it might sort

Date1 = Date

sort it on Date1.

Is Today = if('Date'[Date]=TODAY(),"Today",[Date]&"")

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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