Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

powerbi - 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!

question from:https://stackoverflow.com/questions/65886515/can-we-compare-a-row-value-with-another-row-value-in-the-table-and-highlight-it

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...