Forum Discussion
Color formatting when text in two different columns are different.
- 1 year ago
inglexjc You could create a calculated column like the following and base the conditional formatting on it's value:
Column = IF( [Initial Ruling] = [Final Ruling], 1, 2 )In PQ:
= if [Initial Ruling] = [Final Ruling] then 1 else 2 - 1 year ago
hi inglexjc , You could create a conditional formatting measure:
Conditional Formatting Color = IF ( SELECTEDVALUE ( tbl[Initial Ruling (SLH)] ) <> SELECTEDVALUE ( tbl[Final Ruling] ), "Red", "Yellow" ) --you may use any other color Power BI can interpret but a safer method is to use RGB, RGBA or Hexadecimal colorsNote: SELECTEDVALUE returns blank if in the current row there are more than one values for the column being referenced so ensure to use a column that will return just a single ruling value for each ruling column (like a case number, etc).
- 1 year ago
you created a column instead of a measure.
hi inglexjc , You could create a conditional formatting measure:
Conditional Formatting Color =
IF (
SELECTEDVALUE ( tbl[Initial Ruling (SLH)] )
<> SELECTEDVALUE ( tbl[Final Ruling] ),
"Red",
"Yellow"
)
--you may use any other color Power BI can interpret but a safer method is to use RGB, RGBA or Hexadecimal colors
Note: SELECTEDVALUE returns blank if in the current row there are more than one values for the column being referenced so ensure to use a column that will return just a single ruling value for each ruling column (like a case number, etc).
When I do this:
It's not working correctly, see about 4th line down should be RED.
What am I doing wrong?
- danextian1 year agoSuper User
you created a column instead of a measure.