This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I am trying to do a conditional formatting, but it looks like because of the summarization, it only formats the first value. See condition below. How can I fix that?
Hi @omaffud
Download PBIX file with the example below
You need to create a measure that determines the color, then apply that measure in the Conditional Formatting.
Heres an example measure using Hex color codes, change these to whatever you want. You can look up Hex color codes online, here's one place HTML Color Picker (w3schools.com)
CF =
VAR _status = SELECTEDVALUE('DataTable'[Item Status])
RETURN
SWITCH( TRUE(),
_status = "Cancelled", "#f00",
_status = "Re-Validated", "#ff0",
_status = "PL Rejected", "#f0f",
"#0f0"
)
Then create Conditional Formatting that uses this measure to apply color to the Status column
You can also use well known color names rather than Hex color codes. See section 4.3 here CSS Color Module Level 3 (w3.org)
Further Reading: see the section 'Color based on a calculation' Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
Regards
Phil
Proud to be a Super User!
Phil,
almost there, but as you can see below, most of the times, the color is not being applied.
My code:
Any clue?
Thanks in advance,
Omaffud
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 22 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 50 | |
| 45 | |
| 20 | |
| 18 | |
| 18 |