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
dhwani
Microsoft Employee
Microsoft Employee

Date Slider to be defaulted to current date and current date -5

HI Team , 

we do have requirement to default our date slider to current date and current date -5. The slider is picking the min and max date values and we are good with the max date value but the default min value whould be max date -5. This requirement is only for default setting and user should have feasibility to change. 

Any inputs on this.

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @dhwani 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

g1.png

 

You may use the 'Date' column as a slicer and set the slicer as 'Relative Date Slicer'.

g2.png

 

Today is 9/14/2020. Here is the result.

g3.png

 

For further information, please refer to the document .

 

Best Regards

Allan

 

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-alq-msft
Community Support
Community Support

Hi, @dhwani 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

g1.png

 

You may use the 'Date' column as a slicer and set the slicer as 'Relative Date Slicer'.

g2.png

 

Today is 9/14/2020. Here is the result.

g3.png

 

For further information, please refer to the document .

 

Best Regards

Allan

 

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

Greg_Deckler
Super User
Super User

@dhwani Can you use a relative Date slicer? Probably the cleanest. Otherwise you can do it by creating a new column and an additional slicer but it is kind of ugly. 



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

@dhwani , No function is available to default the date slicer. The max you can do is have a column like this control the dates in the slicer or a slicer near to the date

 

If( [Date]>=today() -5 && [Date] <= Today() , "Last Five" ,"Others")

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

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.