Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Leah0528
New Member

Display different colors according to character content

On the Table Visualization, I want that when the content in the column is 'Fail', the characters displayed in red, and when it is 'Pass', it should be displayed in green.

 

I tried Conditional Formatting, but it required inputting the count of value rather than the content, and it can not be changed.

Leah0528_0-1667378424044.png

 

Please provide any other way to achieve this effect, thanks!

1 ACCEPTED SOLUTION

Hello @Leah0528 !

On Field Value on the box "What field should we base this on?" please select the measure.

View solution in original post

3 REPLIES 3
JorgePinho
Solution Sage
Solution Sage

Hello @Leah0528 !

You can create a measure like this:

Color = SWITCH(TRUE(),
SELECTEDVALUE(table[column]) = "Pass", "Green",
SELECTEDVALUE(table[column]) = "Fail", "Red",
"Black")

 

Then apply conditional formatting on the column and choose Field Value instead of Gradient. Use the measure I suggested you and it must work 🙂

Thanks for your solution, but...

I add the new measure but when I choose Field Value, it did not work...

Leah0528_0-1667438069004.png

Could you please let me know which step is wrong?

I'm new in Power BI😢, so please provide detailed steps, thanks

Hello @Leah0528 !

On Field Value on the box "What field should we base this on?" please select the measure.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.