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
Anonymous
Not applicable

Date slicer rolling last xxx days

Hello to all and happy holidays,

 

So, I am building this dashboard with data updating daily from a sql database. the issue that I have is that I want to have the dashboard displaying information for the last 90 days each time the user loads the dashboard, with him not having to choose the time frame from the time slicer. the user should be able to change after it loads the dashboard the time frame and go back in time, or choose another time frame, the initial time frame should be though the last 90 days period.

 

the last 90 days should be rolling or something.

 

is there also a way to include in the date slicer something like Today? to transfer the user to the current date

 

thanks,

4 REPLIES 4
Baskar
Resident Rockstar
Resident Rockstar

In Power bI we can't set default selection  in slicer. so sorry dude

Anonymous
Not applicable

thanks @Baskar there has to be another way, maybe using a separate slicer? 

PavelR
Solution Specialist
Solution Specialist

Hi @Anonymous, what about creating calculated column in date dimension which specifies if the date is in the last 90 days (value will be YES), and if not (value NO). Then you can use this column as slicer and default value will be YES - you can use it as report (page) filter in the right pane in Desktop.

I use this approach to select only dates of current year.

 

Regards

Pavel

You could use this approach but do the filtering in the query editor as performance will be better this way (filtering will be done at the source rather than your local data model)

Similarly you could add a column that calculates duration between today and your date column and set an advanced filter to only show row where this value is <= your desired window.

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.

Top Solution Authors