Forum Discussion

ajrodr198203's avatar
ajrodr198203
New Member
2 years ago
Solved

Background Color based on Slicer Selection

Hello all,   I have a requirement to change background color of a shape based on the filtered values from any of the slicers included on the report. The measure I have so far works but it changes t...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ajrodr198203 ,

     

    Thanks for the reply from danextian , please allow me to provide another insight:

     

    You can try formula like below:

    11 =
    VAR sel_practise =
        SELECTEDVALUE ( 'Table'[Requesting Practice] )
    VAR choose =
        SELECTEDVALUE ( 'Table'[Requesting Practice] ) & " "
            & SELECTEDVALUE ( 'Table'[Order Status] )
    VAR target_ =
        MAX ( data[Requesting Practice] ) & " "
            & MAX ( data[Order Status] )
    VAR count_ =
        COUNTROWS ( FILTER ( data, data[Requesting Practice] = sel_practise ) )
    RETURN
        IF ( count_ > 0, "Blue", IF ( choose = target_, "Blue", "Gray" ) )
    

    Best Regards,
    Adamk Kong

     

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