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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bella769
Frequent Visitor

Setting default date in a slicer

Hi everyone,

I want to set the default date to 'today' in my slicer so whenever I update my report it opens on today's date.  I've managed to do this by adding a column to my date table pretty basic but it works

 

CurrentDate =
var currentrowdate = FORMAT('Date Range'[Current Year Date], "dd/mm/yyyy")
var currentdate = FORMAT(NOW(), "dd/mm/yyyy")
return
if(currentdate = currentrowdate, "Yes", "No")
Then I can filter on "Yes" for today. 
I also want the option for users to be able to change this date using the dropdown option in a slicer but because the table is filtered on "Yes" the only date showing is today?
 
Anyone got any ideas or tricks?
Thanks
1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi , @bella769 

Please take a try of  the following workarounds  .

1.Adding a custom column as a slicer (the date of "today"  changed as   "Today" )  

For more details ,please refer to this post

test demo pbix 1

 

2. Creating a separate table as a slicer (specifically add a "today" filter option in the list) and a visual control measure ( you need to  apply  it  to the filter pane of table visual)

For more details ,please refer to this related post

test demo pbix2

 

3. Using relative date slicer /filters 

For more details, please refer to this document

 

Best Regards,
Community Support Team _ Eason
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

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi , @bella769 

Please take a try of  the following workarounds  .

1.Adding a custom column as a slicer (the date of "today"  changed as   "Today" )  

For more details ,please refer to this post

test demo pbix 1

 

2. Creating a separate table as a slicer (specifically add a "today" filter option in the list) and a visual control measure ( you need to  apply  it  to the filter pane of table visual)

For more details ,please refer to this related post

test demo pbix2

 

3. Using relative date slicer /filters 

For more details, please refer to this document

 

Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

I have done something like this

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

But it is text

And sorted it on the date.

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

Refer:https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.