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 September 15. Request your voucher.

Reply
x2kibail
Helper I
Helper I

Disable/Enable Multiple Date Slicers, Maybe with Buttons

Hey guys,

 

I've been tasked with creating a report that requires multiple date slicers. These date slicers will need to be 'between slicers'.

 

I've been asked to include a way to disable/nullify each, so that, for example, a particular end-user wants to use the report while filtering based off one of the three date slicers and doesn't want the other two to affect the report. Or maybe they only want to exclude one of the three slicers. Whatever the solution, it'll need variability 

 

Best thing would be to have a check box/button for each date slicer that when checked, would disable the slicer. 

 

Any ideas on how to accomplish this?

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @x2kibail 

 

Perhaps the following methods can help.

 

My sample:

vxuxinyimsft_0-1706773685078.png

 

1. Create three calculated tables as follow

TARGSTARTDATE = VALUES('Table'[TARGSTARTDATE])
COMPLIANCEDATE = VALUES('Table'[COMPLIANCEDATE])
LASTCOMPLETIONDATE = VALUES('Table'[LASTCOMPLETIONDATE])

 

Use these three tables as slicer

vxuxinyimsft_1-1706773878315.png

 

2. Create a measure as follow

Measure = 
VAR _t = IF( SELECTEDVALUE('Table'[TARGSTARTDATE]) >= MIN(TARGSTARTDATE[TARGSTARTDATE]) && SELECTEDVALUE('Table'[TARGSTARTDATE]) <= MAX(TARGSTARTDATE[TARGSTARTDATE]), 1, 0)
VAR _c = IF( SELECTEDVALUE('Table'[COMPLIANCEDATE]) >= MIN(COMPLIANCEDATE[COMPLIANCEDATE]) && SELECTEDVALUE('Table'[COMPLIANCEDATE]) <= MAX(COMPLIANCEDATE[COMPLIANCEDATE]), 1, 0)
VAR _l = IF( SELECTEDVALUE('Table'[LASTCOMPLETIONDATE]) >= MIN(LASTCOMPLETIONDATE[LASTCOMPLETIONDATE]) && SELECTEDVALUE('Table'[LASTCOMPLETIONDATE]) <= MAX(LASTCOMPLETIONDATE[LASTCOMPLETIONDATE]), 1, 0)
RETURN
IF(ISFILTERED(TARGSTARTDATE), _t, IF(ISFILTERED(COMPLIANCEDATE), _c, IF(ISFILTERED(LASTCOMPLETIONDATE), _l, 1)))

 

3. Put the measure into the visual-level filters, set up show items when the value is 1

vxuxinyimsft_2-1706773973139.png

 

vxuxinyimsft_3-1706774011816.png

 

This way the three slicers can work separately. If you want one slicer to work, click on the option shown here for the other two slicers.

vxuxinyimsft_4-1706774181715.png

 

Is this the result you expect?

 

Best Regards,
Community Support Team _Yuliax

 

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

View solution in original post

x2kibail
Helper I
Helper I

Thank you all for the help! I do believe creating the three tables, using the measure and the clear selections option on the slicers would do the trick, but it doesn't quite give me everything I want. It's just me being picky, but I really dont want to have to have my users, using the clear selections options on the slicers. 

 

I guess I was being impatient before, because with a bit more digging, I was able to find the exact solution I wanted. The key is the option to use 'selected visuals' when setting up bookmarks. Please see below for a walkthrough of what I did:

 

1. Set up report, how you would like to see it. (including buttons, there should be two buttons for each date slicer)

x2kibail_2-1707143350398.png

 

 

2. For each date slicer, create a bookmark for when the slicer be 'disabled'.

    a. use clear selections, to make sure all the data is reset to default

    b. add two shapes and cover date boxes, so they cannot be selected.

x2kibail_1-1707143038543.png

 

    c. in the selection pane, hide the button you will use for disabling the slicer (pretend the picture says Disable) 

x2kibail_3-1707143473628.png

 

    d. selecting objects/slicers you want affected while creating the bookmark

    e. set the bookmark to work on 'selected visuals' not 'all visuals'

x2kibail_4-1707143537234.png

 

3. set button for disabling slicer

   a. set button with action to deploy disable bookmark

x2kibail_5-1707143579435.png

 

   b. when selected, the slicer should clear its selections, the shapes should appear over the date boxes, and the button should disappear (we will set the second button to take its place)

x2kibail_6-1707143703258.png

 

4. For each date slicer, create a bookmark for when the slicer will be 'enabled'.

    a. in selection pane, hide shapes that cover the slicer date boxes and hide the button you will use for enabling

    b. do this by selecting objects/slicers you want affected while creating the bookmark

    c. set the bookmark to work on 'selected visuals' not 'all visuals'

5. set button for enabling the slicer

   a. set button with action to deploy enable bookmark

   b. when selected the slicer should have no impediments from being used and you should not see the 'enabler button' but the 'disable button'

6. repeat steps 2-6 with each date slicer

View solution in original post

8 REPLIES 8
x2kibail
Helper I
Helper I

Thank you all for the help! I do believe creating the three tables, using the measure and the clear selections option on the slicers would do the trick, but it doesn't quite give me everything I want. It's just me being picky, but I really dont want to have to have my users, using the clear selections options on the slicers. 

 

I guess I was being impatient before, because with a bit more digging, I was able to find the exact solution I wanted. The key is the option to use 'selected visuals' when setting up bookmarks. Please see below for a walkthrough of what I did:

 

1. Set up report, how you would like to see it. (including buttons, there should be two buttons for each date slicer)

x2kibail_2-1707143350398.png

 

 

2. For each date slicer, create a bookmark for when the slicer be 'disabled'.

    a. use clear selections, to make sure all the data is reset to default

    b. add two shapes and cover date boxes, so they cannot be selected.

x2kibail_1-1707143038543.png

 

    c. in the selection pane, hide the button you will use for disabling the slicer (pretend the picture says Disable) 

x2kibail_3-1707143473628.png

 

    d. selecting objects/slicers you want affected while creating the bookmark

    e. set the bookmark to work on 'selected visuals' not 'all visuals'

x2kibail_4-1707143537234.png

 

3. set button for disabling slicer

   a. set button with action to deploy disable bookmark

x2kibail_5-1707143579435.png

 

   b. when selected, the slicer should clear its selections, the shapes should appear over the date boxes, and the button should disappear (we will set the second button to take its place)

x2kibail_6-1707143703258.png

 

4. For each date slicer, create a bookmark for when the slicer will be 'enabled'.

    a. in selection pane, hide shapes that cover the slicer date boxes and hide the button you will use for enabling

    b. do this by selecting objects/slicers you want affected while creating the bookmark

    c. set the bookmark to work on 'selected visuals' not 'all visuals'

5. set button for enabling the slicer

   a. set button with action to deploy enable bookmark

   b. when selected the slicer should have no impediments from being used and you should not see the 'enabler button' but the 'disable button'

6. repeat steps 2-6 with each date slicer

Anonymous
Not applicable

Hi @x2kibail 

 

Perhaps the following methods can help.

 

My sample:

vxuxinyimsft_0-1706773685078.png

 

1. Create three calculated tables as follow

TARGSTARTDATE = VALUES('Table'[TARGSTARTDATE])
COMPLIANCEDATE = VALUES('Table'[COMPLIANCEDATE])
LASTCOMPLETIONDATE = VALUES('Table'[LASTCOMPLETIONDATE])

 

Use these three tables as slicer

vxuxinyimsft_1-1706773878315.png

 

2. Create a measure as follow

Measure = 
VAR _t = IF( SELECTEDVALUE('Table'[TARGSTARTDATE]) >= MIN(TARGSTARTDATE[TARGSTARTDATE]) && SELECTEDVALUE('Table'[TARGSTARTDATE]) <= MAX(TARGSTARTDATE[TARGSTARTDATE]), 1, 0)
VAR _c = IF( SELECTEDVALUE('Table'[COMPLIANCEDATE]) >= MIN(COMPLIANCEDATE[COMPLIANCEDATE]) && SELECTEDVALUE('Table'[COMPLIANCEDATE]) <= MAX(COMPLIANCEDATE[COMPLIANCEDATE]), 1, 0)
VAR _l = IF( SELECTEDVALUE('Table'[LASTCOMPLETIONDATE]) >= MIN(LASTCOMPLETIONDATE[LASTCOMPLETIONDATE]) && SELECTEDVALUE('Table'[LASTCOMPLETIONDATE]) <= MAX(LASTCOMPLETIONDATE[LASTCOMPLETIONDATE]), 1, 0)
RETURN
IF(ISFILTERED(TARGSTARTDATE), _t, IF(ISFILTERED(COMPLIANCEDATE), _c, IF(ISFILTERED(LASTCOMPLETIONDATE), _l, 1)))

 

3. Put the measure into the visual-level filters, set up show items when the value is 1

vxuxinyimsft_2-1706773973139.png

 

vxuxinyimsft_3-1706774011816.png

 

This way the three slicers can work separately. If you want one slicer to work, click on the option shown here for the other two slicers.

vxuxinyimsft_4-1706774181715.png

 

Is this the result you expect?

 

Best Regards,
Community Support Team _Yuliax

 

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

ankeet1pi9
Regular Visitor

You will need three different date tables, one for each slicer. Set the slicers' settings to use BETWEEN.

 

 

slicer-date-range-between.png

 (Image Source: learn.microsoft.com)

x2kibail
Helper I
Helper I

x2kibail_0-1706735714460.png

Here is what I built out so far (with some data blacked out), so you guys have a picture of what I'm trying to get at.

sayaliredij
Solution Sage
Solution Sage

Hi @x2kibail 

 

Not sure how your report look like

But in case you can share report with sample data in it, i can check the same 

 

Thanks and Regards,

 

Sayali

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful!! 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




x2kibail_1-1706735784248.png

is this enough to give you an idea?

sayaliredij
Solution Sage
Solution Sage

HI @x2kibail 

 

I believe calculation groups can solve your problem 

 

Please refer the article below that exactly solves the problem you are facing

https://www.sqlbi.com/articles/using-calculation-groups-to-switch-between-dates/

Thanks and Regards,

 

Sayali

 

Please mark the question solved when done and consider giving a thumbs up if posts are helpful!! 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I'll need to look deeper, but through a quick glance, I don't think this accomplishes exactly what I need. 

 

I need the date slicers to be in the between format. I need to see data in a table, mostly raw data. I'm not dealing with any aggregations ...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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