Forum Discussion
creyssonbr
5 years agoNew Member
Comparing two columns and set colors for specific match in Power BI
Hi, I want to retrieve a value from two common rows and use if to return color, for conditional formatting in Power BI, as the following requirement: If content doesn't show on table 1 and doe...
- Anonymous5 years ago
HI creyssonbr ,
Create a Calculated Column in Table A
ContentTableB = LOOKUPVALUE(TableB[Content],TableB[Content],TableA[Content])You can use this measure
Measure = SWITCH ( TRUE(), MAX(TableA[ContentTableB]) = BLANK() && MAX(TableA[Age]) < 10,"Yellow", MAX(TableA[ContentTableB]) = BLANK() && MAX(TableA[Age]) = 10,"Purple", MAX(TableA[ContentTableB]) = BLANK() && MAX(TableA[Age]) = 10,"Red", MAX(TableA[ContentTableB]) = MAX(TableA[Content]),"Green", "Black" )Follow the stps:
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Anonymous
5 years agoNot applicable
HI creyssonbr ,
Create a Calculated Column in Table A
ContentTableB = LOOKUPVALUE(TableB[Content],TableB[Content],TableA[Content])
You can use this measure
Measure = SWITCH
(
TRUE(),
MAX(TableA[ContentTableB]) = BLANK() && MAX(TableA[Age]) < 10,"Yellow",
MAX(TableA[ContentTableB]) = BLANK() && MAX(TableA[Age]) = 10,"Purple",
MAX(TableA[ContentTableB]) = BLANK() && MAX(TableA[Age]) = 10,"Red",
MAX(TableA[ContentTableB]) = MAX(TableA[Content]),"Green",
"Black"
)
Follow the stps:
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)