Forum Discussion

EMN's avatar
EMN
Regular Visitor
1 year ago
Solved

Conditional Formatting to highlight columns with mismatched values

I have two columns of data; I'd like to apply conditional formatting to values that match and values that don't.   The State column is called from a table called ReportTable. The Issue_State...
  • Ritaf1983's avatar
    1 year ago

    Hi EMN 
    According to the colors you can use a measure like :

    color = if(SELECTEDVALUE('Issues'[State])=SELECTEDVALUE('ReportTable'[Issue_State]),"Green","Red" )
    and apply this measure for all the columns that you need 
    Result after applying for all the columns

    You can use hexa codes instead of color names :

    My recommendation from an effective visualization perspective is to highlight only what is "not correct." This approach reduces cognitive load, as red will always stand out much more against white compared to other colors. The purpose of colors is to alert where improvement is needed 🙂

    According to the filtering you can create flag measures like :

    filter =
    var state = SELECTEDVALUE('Issues'[State])
    var issue_state = SELECTEDVALUE('ReportTable'[Issue_State])
    RETURN
    if (state IN {"closed","Defered"} || issue_state  IN {"closed","Defered"} , 0,1)
    And use it as a visual filter :

    Result :

    PBIX is attached

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