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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ginalu
Helper I
Helper I

Automatically Setting Default Date Range in Power BI Filter

Question:

I want to set the default range of a date slicer in Power BI to automatically cover the full range from the earliest date to the latest date available in the data. I also want this range to update automatically whenever the data is refreshed. How can I achieve this?

 

Snipaste_2024-09-12_09-03-05.png

1 ACCEPTED SOLUTION

Hi, @ginalu  if you see this, it means that something in your model on this date appears...
The function takes all the date fields of all tables in the model...
If you want to limit the slicer by specific column you can create a flag measure like 

Ritaf1983_0-1726106044667.png

and then use this flag as a filter for the slicer :

Ritaf1983_1-1726106086240.png

The updated pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @ginalu 
You can create an automatically updated date table based on the data using function calendarauto() .

Ritaf1983_0-1726103537263.png

Ritaf1983_1-1726103598295.png

this function returns the date range according to the dates of the model so you'll always have it dynamic.

Ritaf1983_2-1726103800869.png

 

Ritaf1983_3-1726103847551.png

Regarding the second question unfortunately we don't have the functionality of dynamic selection automatically, so the range will be changed, but still, the user should change the selection to change the filter context:

Ritaf1983_4-1726103968922.png

The automatic selections that we have is only with related date functionality 

Ritaf1983_5-1726104066123.png

Pbix with the example is attached

more information about calendarauto () here :
https://www.youtube.com/watch?v=b23bk6TcXak

Relative date functionality :
https://www.youtube.com/watch?v=jT1YuNTpQDU

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983 ,

 

Thank you for your response. I tried the suggestion you provided, but I noticed that the filter date is showing a future date of 2034. I would like it to display the maximum value of the existing date data instead.

Snipaste_2024-09-12_09-40-07.png

Hi, @ginalu  if you see this, it means that something in your model on this date appears...
The function takes all the date fields of all tables in the model...
If you want to limit the slicer by specific column you can create a flag measure like 

Ritaf1983_0-1726106044667.png

and then use this flag as a filter for the slicer :

Ritaf1983_1-1726106086240.png

The updated pbix is attached

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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