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.
Greg_Deckler
1 year agoCommunity Champion
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