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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
FrankvanDorp
Helper I
Helper I

Dynamically change preselected values in time slicer to always show last three months

I have a dashboard with a time column, and after I upload it to Power BI server, I want it to always preselect the last three months in the dashboard.

 

The dashboard consists of a slicer for Date, and a graph of COVID cases per day from a dummy dataset, like this:

FrankvanDorp_0-1740064793044.png

I now want the slicer to have the last 90 days preselected when a user opens the app in Power BI server. So it should dynamically set the preselected lower boundary to "today - 90 days", and the upper boundary to "today".

 

I can't find a solution to this anywhere, I did find some other people asking this question, but no working solutions (for example, this one does not work for a time slicer where you select a date range between two points: Solved: How to Set Default Value in Slicer to Always Show ... - Microsoft Fabric Community).

 

Just to make a few things clear, because AIs cannot understand most of this:

I am looking for a way to set the preselected value to 90 days back, NOT the minimum value. The user should be able to select earlier dates if he wants to. It's the initial selected values I'm talking about, not the absolute limits of the slicer.

So on 01/01 for example the user should see this when loading the dashboard: 

FrankvanDorp_1-1740065094112.png

 

I also do NOT want a solution where a user has to do things or click on things, because that would effectively be the same as just telling the user to manually select the last three months every time. I'm looking for a way to preselect the last 90 days automatically when the user opens the dashboard, without the user having to do anything.

 

Here is a link to this dashboard with the dummy dataset:

testpbi.pbix

2 REPLIES 2
audreygerred
Super User
Super User

Hello! Right now your slicer is set to Between as its type. You can go into formatting, expand Slicer settings, and in Options change it to Relative Date. Your slicer will now look like this: 

audreygerred_0-1740066179209.png

If you set it to the last 90 days you will get this:

audreygerred_1-1740066215375.png

If you set it to last 3 months, you will get this:

audreygerred_2-1740066253981.png

If you select last 3 months (calendar) you will get this:

audreygerred_3-1740066297285.png

If you use the filter pane instead of a slicer, you can do relative date there as well.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hello Audrey,

 

Thank you for your reply, but unfortunately this doesn't do what I need. This way the end date would always be fixed on today, while the user can no longer select a date, but have to calculate how many days back his desired date was.

 

I need it on the Between setting so the user can customize the timeframe, and often he will want to look at specific months in the past, not ending today. I need to keep that flexibility and only set the preselected values to the last three months until today, while the user can then change the start and end date if he chooses to.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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