Forum Discussion

Shreyu123's avatar
Shreyu123
New Member
3 years ago
Solved

Select and enable slicer

Hi Team,

 

I have 2 tables .

Table 1 : A

Table 2 :C,D

I have created 2 slicers

Slicer 1 has values : A

Slicer 2 has :C,D

I am trying to enable/disable slicer1 based on selection from Slicer 2.

 

If C is selected in Slicer2,Slicer 1 will be shown/enabled.

If D is selected in SLicer 2,  Slicer 1 should be disabled.

 

I have craeted a measure which is doing that:

  Enable_Disable =
    var slicer2 = SELECTEDVALUE(Table1[Type])
    RETURN IF(slicer2="C",1,0)
 
 Disabing when D selected:
 

 

Enabling when C is selected:

 

 

Now i want to select A and enable the slicer when C is selected as below:

 

 

 

I tried multiple ways but unable to do it.

Any help welp be really appreciated.

 

sample pbix file : https://1drv.ms/u/s!AjqH7k_M5ZVEhB3KilJmJISOSO4K?e=JfbO8P

 

Thanks

Shreya

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Shreyu123 ,

     

    Your measure is correct. If you choose D in Slicer 2, there's no value in Slicer 1.

    If you have selected A in Slicer 2 before Slicer 1 is filtered, A will still exist after D is selected in Slicer 2, but if you cancel A, the Slicer 1 will become empty. This situation is by design and cannot be changed at present.

     

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

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

     

3 Replies

  • kpost's avatar
    kpost
    Solution Sage

    Conditionally showing or hiding visuals based on logic is not possible at this time.  You'll need to use bookmarks.

    • Shreyu123's avatar
      Shreyu123
      New Member

      Hi,

       

      Thanks for the reply.

      I cannot use bookmark as i want the value to be selected based on the drop down value from other slicer.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Shreyu123 ,

     

    Your measure is correct. If you choose D in Slicer 2, there's no value in Slicer 1.

    If you have selected A in Slicer 2 before Slicer 1 is filtered, A will still exist after D is selected in Slicer 2, but if you cancel A, the Slicer 1 will become empty. This situation is by design and cannot be changed at present.

     

                                                                                                                                                             

    Best Regards,

    Stephen Tao

     

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