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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Pandangus
Frequent Visitor

Set dynamic default slicer selection

I have a report which can visualise data going back many years. I have a sliding ‘after’ date slicer with which the user can select a single date and filter out all data from before that date. What the user is left with is the data from that selected date right up to the current day.

 

What I need is for the slicer to default to a date of 14 days before the present day. So when a user opens the report, the visualisation shows the data from the previous 14 days up to the present day as default.

 

To be clear, I still need the user to be able to manually alter the ‘after’ date so that they can expand or narrow the data range.  But when the report is closed and later reopened, it should once again default to 14 days before the current date.

 

Also, this needs to be dynamic; simply setting a date as a default date will not do as it has to dynamically shift so it's always displaying the data from the previous 14 days.

 

I've been struggling to implement this, and was wondering if this possible in Power BI?

Any help would be greatly appreciated. 🙂


Angus

1 ACCEPTED SOLUTION

@Pandangus ,

 

well this is the solution that works for the last 14 days, if you want to add another slicer so the user would pick, it will reflects only 14 days unless the user clear the above slicer.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

4 REPLIES 4
Idrissshatila
Super User
Super User

Hello @Pandangus ,

 

yes you can do ths, check the following:

 

first you add the date to a slicer, then in the format visual  you click on slicer settings => option => relative Date

Idrissshatila_0-1706897173264.png

 

then what you do is select last and you set the number then the interval which now in your case days

Idrissshatila_1-1706897223698.png

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hello @Idrissshatila 

   Thank you so much for your response 😊 your solution works great on my end, and does show the data from the previous 14 days.

   Though I do wonder if it is possible to enable the user to select a specific date using a calendar or slider, and display data from after that selected date. I know the user could achieve this by working out the number of days before the current date, and entering that number, but I wanted to make it as easy as possible for them by providing a calendar or slider for them to interact with if possible.

Angus

@Pandangus ,

 

well this is the solution that works for the last 14 days, if you want to add another slicer so the user would pick, it will reflects only 14 days unless the user clear the above slicer.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




That's a great idea. Thanks so much for your help 👍

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.