Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Solved! Go to Solution.
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.
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.
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.
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.
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
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.
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".
Here's the DAX measure:
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.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |