Forum Discussion

msuser48's avatar
msuser48
Helper I
3 years ago
Solved

How to make one filter change when another filter changes

I have two filters:

 

 

I want to create a measure such that when I click "Yes" in Y/N, I automatically also tick "Active" and "Cancelled" in the State slicer.

 

When I untick "yes", it should also untick "active" and "cancelled" once again from the State slicer.

 

How can this be done?

 

  • Hi msuser48 ,

     

     

    The filtering results of one slicer can affect the results of another slicer, but not just change its "state".
    However, try turning on the "show all" function of the slicer and create the following formula, which will hopefully meet your needs.

    M_ =
    VAR sel =
        SELECTEDVALUE ( slicer_[Y/N] )
    VAR val =
        IF ( MAX ( result[State] ) IN { "Active", "Cancelled" }, 1, 0 )
    RETURN
        IF ( sel = "Yes", val, 1 )

     

     

    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


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

2 Replies

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Community Support

    Hi msuser48 ,

     

     

    The filtering results of one slicer can affect the results of another slicer, but not just change its "state".
    However, try turning on the "show all" function of the slicer and create the following formula, which will hopefully meet your needs.

    M_ =
    VAR sel =
        SELECTEDVALUE ( slicer_[Y/N] )
    VAR val =
        IF ( MAX ( result[State] ) IN { "Active", "Cancelled" }, 1, 0 )
    RETURN
        IF ( sel = "Yes", val, 1 )

     

     

    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


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