Forum Discussion
inglexjc
1 year agoPost Patron
Color formatting when text in two different columns are different.
Need to use color to show when text in 2 separate columns are different. Example if Initial Ruling shows "Dismissed" but Final Ruling shows "Not Decided". But other words could be used. Init...
- 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.
inglexjc
1 year agoPost Patron
When I do this:
Conditional Formatting Color =
IF (
SELECTEDVALUE ( '4HearingsAppeals Items'[Initial Ruling (SLH) (status_color_mknhxvfd)] )
<> SELECTEDVALUE ( '4HearingsAppeals Items'[Final Ruling (SLH) (status_color_mkp6fvmp)] ),
"Red",
"Blue"
And chose it as the conditional formating:
It's not working correctly, see about 4th line down should be RED.
What am I doing wrong?
danextian
1 year agoSuper User
you created a column instead of a measure.