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
PetAlt
New Member

How to allow user to switch between two types of date slicer without resetting other filters

Hi,
I'm trying to create a report where the user can switch between a Relative Date slicer and a Between Date slicer, but only one should be visible at a time. Ideally, I'd like to use a button or toggle to switch between the two slicers.

The key requirement is:
When switching between slicers, other filter selections (e.g., country, product) should remain unchanged.

I’ve tried using bookmarks to toggle visibility, but if I include the slicers’ values via the “Data” option, all filters get reset. On the other hand, if I exclude “Data”, the slicer values don’t change, but the date filter from the hidden slicer is still applied.

Is there a workaround or supported approach that allows this kind of slicer switching while keeping other filters intact?

Thanks in advance for any suggestions!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PetAlt,

Thank you for reaching out in Microsoft Community Forum.

Please follow below steps to resolve the error;

1. Instead of disconnected date tables, use a single custom date table with an added column like:

DateType =
IF([Date] <= TODAY(), "Relative", "Manual")

2.Avoid hiding slicers altogether. Instead, create a dynamic filter measure:

DateFilterFlag =
VAR SelectedToggle = SELECTEDVALUE('ToggleTable'[Date Filter Type])
VAR DateSelected = MAX('CustomDate'[Date])
RETURN
SWITCH(
SelectedToggle,
"Relative", IF(DateSelected >= TODAY() - 30, 1, 0), -- Example logic
"Between", 1, -- Always pass for Between
0
)

3.Use a single DAX measure (like DateFilterFlag = 1) to control what data appears based on the toggle, keeping your visuals clean and avoiding complex visual-level filters.

Please continue using Microsoft Community Forum.

If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.

Regards,
Pavan.

View solution in original post

8 REPLIES 8
v-veshwara-msft
Community Support
Community Support

Hi @PetAlt ,

We’re following up once more regarding your query. If it has been resolved, please mark the helpful reply as the Accepted Solution to assist others facing similar challenges.

If you still need assistance, please let us know.
Thank you.

Anonymous
Not applicable

Hi @PetAlt,

I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, kindly "Accept  as  Solution" and give it a 'Kudos' so others can find it easily.

Thank you,
Pavan.

Anonymous
Not applicable

Hi @PetAlt,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please "Accept  as  Solution" and give a 'Kudos' so other members can easily find it.

Thank you,
Pavan.

Anonymous
Not applicable

Hi @PetAlt,

Thank you for reaching out in Microsoft Community Forum.

Thank you @kpost , @pankajnamekar25  for the helpful response.

Please follow below steps to witching Between Relative and Between Date Slicers;

1.Create a toggle table with two values: "Relative Date" and "Between Date", and use it in a slicer to control which date slicer is active.

2.Add two disconnected date tables (one for each slicer) — these should not be related to your model.

3.Overlay the two slicers and use visual-level filters to show only the relevant slicer based on the toggle selection.

4.Create a DAX measure to apply the correct date filter dynamically, and use it as a visual-level filter (= 1) to control which data appears.

Please continue using Microsoft Community Forum.

If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.

Regards,
Pavan.

Hello,
I'm working on a fairly complex report with ~20 dynamic measures. The user can choose which metric to display, as well as the dimension (e.g. Country, Category, etc.), and these are reflected across multiple visuals.

While the approach of using a DAX measure to filter visuals works technically, it’s not ideal in my case — since applying visual-level filters or rewriting all measures adds significant overhead and complexity.

I’ve also tried using a toggle to switch between two types of date filters (Relative vs. Between), and set up two disconnected date slicers accordingly. However, the main issue is that Power BI doesn’t support dynamically showing only one of the slicers based on toggle selection. I attempted to use bookmarks, but then ran into the known limitation where slicer selections (e.g. Country) get reset unless the “Data” option is turned off — and if it's turned off, the date slicer filters remain active even when hidden.

So far, I haven’t found a clean way to:

  • Let users switch between relative and manual date selection

  • Show only the relevant slicer

  • And still preserve other slicer selections

Anonymous
Not applicable

Hi @PetAlt,

Thank you for reaching out in Microsoft Community Forum.

Please follow below steps to resolve the error;

1. Instead of disconnected date tables, use a single custom date table with an added column like:

DateType =
IF([Date] <= TODAY(), "Relative", "Manual")

2.Avoid hiding slicers altogether. Instead, create a dynamic filter measure:

DateFilterFlag =
VAR SelectedToggle = SELECTEDVALUE('ToggleTable'[Date Filter Type])
VAR DateSelected = MAX('CustomDate'[Date])
RETURN
SWITCH(
SelectedToggle,
"Relative", IF(DateSelected >= TODAY() - 30, 1, 0), -- Example logic
"Between", 1, -- Always pass for Between
0
)

3.Use a single DAX measure (like DateFilterFlag = 1) to control what data appears based on the toggle, keeping your visuals clean and avoiding complex visual-level filters.

Please continue using Microsoft Community Forum.

If this post helps in resolve your issue, kindly consider marking it as "Accept as Solution" and give it a 'Kudos' to help others find it more easily.

Regards,
Pavan.

kpost
Super User
Super User

You only need ONE date slicer, no bookmarks.

 

Next to the date slicer, I'd have a single-select slicer that allows you to dictate the behavior of the slicer.

 

See pic below.  Depending on what is selected in the Options box, the dax measure will calculate differently.  That one date slicer can now be used as "between", "ignore upper value", and "Ignore lower value".

 

 

example.png

 

Here's the DAX measure:

 

Summed_Value =
    var selection = SELECTEDVALUE(Selections[Options])
    VAR MINDATE = MIN(DateDim[Date])
    VAR MAXDATE = MAX(DateDim[Date])
RETURN
    SWITCH(
        selection,
        "Between", COALESCE(SUM(Fact_Table[Value]), 0),
        "Ignore Lower", CALCULATE(COALESCE(SUM(Fact_Table[Value]), 0), ALL(DateDim), Fact_Table[Date] <= maxdate),
        "Ignore Upper", CALCULATE(COALESCE(SUM(Fact_Table[Value]), 0), ALL(DateDim), Fact_Table[Date] >= mindate)
    )
 
 
See attached .pbix file with the implemented solution so you can see how I put it together and copy the method for your report.
 
///Mediocre Power BI Advice, but it's free///
pankajnamekar25
Super User
Super User

Hello @PetAlt 

You can use bookmark 

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Kudoed Authors