Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Conditional Formatting based on 2 columns

Problem Case: I have 2 columns in my table visual called A and B and they contain numeric values. I want to highlight the rows where value of Column A is not equal to value of Column B. How can I ach...
  • parry2k's avatar
    1 year ago

    Anonymous you can add a measure to check this and assign the color code:

     

    Color = 
    VAR __ColA = SELECTEDVALUE ( Table[Col A] )
    VAR __ColB = SELECTEDVALUE ( Table[Col B] )
    RETURN
    IF ( __ColA <> __ColB, "Red" )

     

    Use above measure in the conditional formatting.