Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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.
Initial Ruling (SLH) | Initial Ruling Date | Final Ruling |
Dismissed | 5/22/2025 | Dismissed |
Dismissed | 5/6/2025 | Not Decided |
Dismissed | 5/16/2025 | Dismissed |
Dismissed | 6/2/2025 | Dismissed |
Dismissed | 5/1/2025 | Dismissed |
Dismissed | 2/12/2025 | Dismissed |
Dismissed | 1/24/2025 | Dismissed |
Dismissed | 5/23/2025 | Dismissed |
Dismissed | 4/24/2025 | Not Decided |
Dismissed | 4/17/2025 | Dismissed |
Dismissed | 6/2/2025 | Dismissed |
Dismissed | 5/27/2025 | Dismissed |
Dismissed | 4/2/2025 | Dismissed |
Dismissed | 4/2/2025 | Dismissed |
Dismissed | 2/20/2025 | Dismissed |
Dismissed | 6/30/2025 | Dismissed |
Dismissed | 1/30/2025 | Dismissed |
Dismissed | 4/30/2025 | Dismissed |
Dismissed | 7/15/2025 | Dismissed |
Dismissed | 6/9/2025 | Dismissed |
Dismissed | 4/8/2025 | Dismissed |
Dismissed | 1/2/2025 | Dismissed |
Dismissed | 2/4/2025 | Dismissed |
Dismissed | 5/12/2025 | Dismissed |
Dismissed | 3/31/2025 | Dismissed |
Solved! Go to Solution.
@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
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).
you created a column instead of a measure.
Hi @inglexjc ,
Both solutions work, but I'd go with @Greg_Deckler 's approach - it's simpler and more reliable.
The calculated column method:
RulingMatch = IF([Initial Ruling] = [Final Ruling], 1, 0)
Then use this column for conditional formatting:
Why this is better than the measure approach: The SELECTEDVALUE measure can get tricky if your table visual has any grouping or if there are multiple rows with the same values. The calculated column approach works consistently regardless of how your visual is set up.
Power Query version (if you prefer doing it there):
= if [Initial Ruling] = [Final Ruling] then "Match" else "Different"
Then color format based on "Match" vs "Different".
For your conditional formatting:
This way you get a clear visual indication whenever the rulings don't match, which seems to be what you're looking for.
The calculated column approach is bulletproof and works in any visual configuration.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.
When I do:
If I try the other way I get an error:
Thoughts?
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?
you created a column instead of a measure.
@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
User | Count |
---|---|
66 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
86 | |
75 | |
56 | |
50 | |
45 |