Forum Discussion

aileenkaz's avatar
aileenkaz
Frequent Visitor
4 years ago
Solved

Two mutually exclusive slicer filters

Hello,

I am working on two slicer filters that can be used only separately.

My data contain two columns I am using to filter them.

I have created a measure to check if the Filter B is being used and I used this measure B_active on Filter A (to make it showing values if B_active is 0). 

 

B_active = IF(ISFILTERED(Table1[Value]), IF(ISBLANK(SELECTEDVALUE(Table1[Value])),0,1),0)

 

Value of B_active is changing as expected so I supposed that Filter A will be empty when Filter B is active.

However, if column A is containing only one type of value after filtering by Filter B, my idea does not work because this value is then shown in Filter A. Can you help me to find out how to create some workaround for this?

 

I have prepared some example for you: pbix file 

Try to select "t" in Filter B. Filter A will shown "John" but I need it to be completely empty when Filter B is active.

 

Thanks!

 

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi aileenkaz 

    I have downloaded your sample and had a test. I think your meausres is correct. I see your B_active in Filter Field in Filter A is filtering all not 0. So you will get "John" in Filter A when you select "t" in Filter B, this result is based on row context.  Please check whether you have set B_active in Filter A to show items when value = 0.

    Best Regards,
    Rico Zhou

     

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

2 Replies

  • Most likely you need a more extensive data model, with dimension tables for your two slicers. 

     

    Filters can also be checked with HASONEFILTER() or FILTERS()  DAX functions - maybe these functions suit your needs better.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi aileenkaz 

    I have downloaded your sample and had a test. I think your meausres is correct. I see your B_active in Filter Field in Filter A is filtering all not 0. So you will get "John" in Filter A when you select "t" in Filter B, this result is based on row context.  Please check whether you have set B_active in Filter A to show items when value = 0.

    Best Regards,
    Rico Zhou

     

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