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
shhafiz
Employee
Employee

Setting the Default Value of a Date based Slicer

Similar question has been asked already but I could not relate them fully to my scenario so I am asking here.

 

I have a slicer which works on a Date type column. I am using Date and no hierarchy, therefore the initial state of the slicer is set to a range so that it covers all dates within the column.

 

Now, I would like to be able to set the intial state to a reduced range, in particular a date range covering last seven days but still allow the same slicer to be used to select a different date range. For example, suppose the date column contains values in the range  Aug 1 2017 to Oct 10 2017, which shows up when the report is loaded. I now want the initial selection to be  Oct 4 2017 to Oct 10 2017 (last seven days). However, user should still be able to modify the slicer to select any other date falling within the entire range.

 

Thanks.

 

 

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @shhafiz,


Now, I would like to be able to set the intial state to a reduced range, in particular a date range covering last seven days but still allow the same slicer to be used to select a different date range.


I don't think there is a way to do it with the Date Range Slicer in Power BI currently. An alternative way is to use the Relative Date Slicer. It can be set to the last 7 days initially, and then it can also be changed to other relative date ranges(i.e. last 100 days). Smiley Happy

 

range.PNG

 

Regards

View solution in original post

3 REPLIES 3
v-ljerr-msft
Employee
Employee

Hi @shhafiz,


Now, I would like to be able to set the intial state to a reduced range, in particular a date range covering last seven days but still allow the same slicer to be used to select a different date range.


I don't think there is a way to do it with the Date Range Slicer in Power BI currently. An alternative way is to use the Relative Date Slicer. It can be set to the last 7 days initially, and then it can also be changed to other relative date ranges(i.e. last 100 days). Smiley Happy

 

range.PNG

 

Regards

@v-ljerr-msft 

 

Thanks for the reply. It does solve the intial problem I had but now introduced a new one. With this modified form, I can no longer choose a single day in the past. Say, I want to choose just Oct 5 2017, but today being Oct 13 2017, no relative date would let me choose that specific date.  The problem is we can't seem to change the view of the slicer from Power BI service, so stuck with whatever is at design.

 

A possible solution is to have two slicers acting on the same field, but looks like those work by doing AND on the dates, so it would need some thinking from the users to get this. Also, it kind of looks silly to have two similar filters on same page. 

 

Do you have any recommendations on this?

Hi @shhafiz,

 

I don't think there is a better solution but using two Slicers in your scenario currently. You can add it as an idea on Power BI Idea forum to improve Power BI on this feature. Smiley Happy

 

Regards

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.