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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
acmo
Regular Visitor

Date Slicer default value

Hi all!

 

We are using the date slicer in many of our reports. However, there is a case where, instead of having the whole interval of dates, we want to see by default only the date of the last entries. For instance: we have n different dates. By default, the visual will select the interval oldest(n) - most_recent(n)  but in this case we only want most_recent(n) - most_recent(n). Moreover, we don't want to lose data. I mean, the slicer should be ready to filter values based on user's demands.

 

Do you know any approach to do that?

 

Thank you in advance.

 

Kind regards!

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Please see the relative date slicer/filter functionality. You can set the slicer (or filter in filter panel) to filter to the last X days.

 

Use a relative date slicer or filter in Power BI - Power BI | Microsoft Docs

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @acmo ,

I'm a little confused about your needs, Could you please explain them further? It would be good to provide a screenshot of the results you are expecting.

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_ Binbin Yu

We have a report with a temporary window, for example from August 4th to August 20th.
In order to filter by dates, we use the default component of power bi with the calendar functionality:

 

MicrosoftTeams-image (4).png

 

The data in the report is updated automatically every day, so, on August 21st we will have the data for the August 20th available (our time window increases).
Whenever we open the report, by default, we want to display data from the last available day (without having to filter manually).
In summary, we want, that when we open the report on the August 21st, to automatically see the data for August 20th, when opening the report on August 27th, see the data for August 26th and so on but
taking into account that the functionality of being able to manually filter a time window (for example from January 30th to February 13th) must still work.

 

Kind regards.

 

mahoneypat
Microsoft Employee
Microsoft Employee

Please see the relative date slicer/filter functionality. You can set the slicer (or filter in filter panel) to filter to the last X days.

 

Use a relative date slicer or filter in Power BI - Power BI | Microsoft Docs

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


amitchandak
Super User
Super User

@acmo , Not very clear, but do want something like

 

new measure =
var _max = maxx(allselected(Date),Date[Date])
var _min = minx(allselected(Date),Date[Date])
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Date] =_max)) - calculate( sum(Table[Value]), filter('Date', 'Date'[Date] =_min))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors