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
RohiniP-26
Resolver I
Resolver I

dynamically disable slicers

Hi All,

 

RohiniP-26_0-1618469051358.png

I have the above three slicers in my report. I need to know that can slicers be disabled dynamically ?

for ex: If i select any one value in Year slicer, then other two slicers (Month ans SalesNo) must in a disabled state.

How can i achieve this ?

 

Thanks...

 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @RohiniP-26 

According to your description, I think you can achieve this using a measure and a visual filter, you can try my steps:

This is my test data based on your sample picture:

v-robertq-msft_0-1618820345972.png

 

  1. Create a measure:
Flag =

IF(ISFILTERED('Date'[YEAR]),1,0)
  1. Apply the filter to the two slicers like this:

v-robertq-msft_1-1618820345978.png

v-robertq-msft_2-1618820345984.png

 

And you can get what you want, like this:

v-robertq-msft_3-1618820345985.png

v-robertq-msft_4-1618820345986.png

 

When you selected one value in the Year filter, you can not select any value in the other two filters.

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

4 REPLIES 4
v-robertq-msft
Community Support
Community Support

Hi, @RohiniP-26 

According to your description, I think you can achieve this using a measure and a visual filter, you can try my steps:

This is my test data based on your sample picture:

v-robertq-msft_0-1618820345972.png

 

  1. Create a measure:
Flag =

IF(ISFILTERED('Date'[YEAR]),1,0)
  1. Apply the filter to the two slicers like this:

v-robertq-msft_1-1618820345978.png

v-robertq-msft_2-1618820345984.png

 

And you can get what you want, like this:

v-robertq-msft_3-1618820345985.png

v-robertq-msft_4-1618820345986.png

 

When you selected one value in the Year filter, you can not select any value in the other two filters.

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

Hi @v-robertq-msft  your solution is working great and I have tested it today.

The similar measure I have created and used in my visual but that does not work instesd I can see a "i" icon above the slicer and that shows message that Cant not display this visual, but I can see the visual.

 

Example Your Sample (It hides the visual and no "i" icon)

prabhatnath_0-1705091160767.png

Here is My Example with the "i" icon but the slicer is visible.

 

prabhatnath_1-1705091234399.png

prabhatnath_2-1705091254068.png

On click on the "i" icon this dialog shown.

What could be the issue here?

Thanks,

Prabhat

jlf81
Frequent Visitor

I would think you could build something with tables created by DAX for the slicer to remove the other value, using something with SELECTEDVALUE and then use inactive relationships and use measure USERELATIONSHIP to define which table you filter from again using SELECTEDVALUE.

 

Might be quite complicated.

 

The other option is put them all in one slicer and then use a link table to filter it just to the bits you want eg 2021 would have all the periods in 2021 in the link table atributed to it and Jan would have all the Januarys attributed to it

amitchandak
Super User
Super User

@RohiniP-26 , I doubt you can do that.

The only way to control is bookmark and buttons https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

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.