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
andy808
Helper II
Helper II

Show Min and dynamic Max date in "Between" Slicer - override/update "Clear All Filters" Bookmark

I have a Date Table and currently have a Date Slicer showing First and Last Date (from [Date] Column in Date Table), works fine as I refresh and add new dates. The slicer adjusts to latest [Date]. Here it is 2//18/2023

 

andy808_0-1678120700403.png

 

But I have a "Clear All Filters" Bookmark button for the user which resets page (employer wants this feature) and even thought I add new end dates - when I click on "Clear All Filters" button - the slicer goes back to previous date 2/18/2023. 

 

andy808_2-1678121161682.png

 

Results I need:

I need to keep the ability to reset the Date Slicer back to Min date 7/1/2022 (if user chooses 7/2/2022) but force the Max Date to be updated (example here is 3/6/2023) when clicking on the "Clear All Filter" bookmark. (i.e de-selecting Date Slicer visual from the Bookmark is not a solution)

 

How do I do this? 

 

I tried adding DAX Filters to Date Slicer but it doesnt work when I click the Clear All Bookmark:

Max Date for Slicer = MAXX(
    'Date Table',
    'Date Table'[Date]
 
Thank you!

 

 

2 REPLIES 2
MAwwad
Super User
Super User

 

One approach could be to create a measure that calculates the maximum date dynamically based on the current selection in the slicer, and then use this measure in the slicer instead of the actual date column.

For example, you could create a measure like this:

 

 
Max Date = VAR SelectedMinDate = MIN('Date Table'[Date]) RETURN CALCULATE(MAX('Date Table'[Date]), 'Date Table'[Date] >= SelectedMinDate)
 

Then use this measure in the slicer instead of the actual date column. When the user selects a new start date, the slicer will update to show dates from the selected start date up to the dynamically calculated max date based on the current selection.

When the user clicks on the "Clear All Filters" bookmark, you can reset the slicer selection to the minimum date and the dynamically calculated max date will update accordingly.

I created a calculated column in my date table using your measure, applied it to the Date slicer field and I got this:

andy808_0-1678123358364.png

 

andy808_1-1678123409118.png

 

 

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.