coder_bg
coder_bg

Reputation: 370

Can we compare a row value with another row value in the table and highlight it in Power BI?

I have a table where 3 columns can have same value

Example:

Name Score_a Score_b Score_c
A    12       15     18
B    3        3       3
C    20      25       30

I want to highlight ( with a colour ) the row B since all the three scores are same.

I am unable to do it with conditional formatting available. Can something be worked out using DAX? Please help!

Upvotes: 0

Views: 1235

Answers (1)

Agustin Palacios
Agustin Palacios

Reputation: 1206

Yes, first create a measure using the following dax formula:

Measure = 
IF( 
    SELECTEDVALUE( 'Table'[Score_a] ) = SELECTEDVALUE( 'Table'[Score_b] ) && 
    SELECTEDVALUE( 'Table'[Score_b] ) = SELECTEDVALUE( 'Table'[Score_c] ), 1, 0
)

Then you need to use conditional format on every column that you want to highlight and select the Measure you created.

enter image description here

This is the result

enter image description here

Upvotes: 2

Related Questions