Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Is there any way to set conditional formatting rules for a whole table based on text fields?
I have looked and can only create conditional formatting rules that are based off numbers. This is a snippet of the table. I would need yes values to be highlighted green, in transit light green, and no in Red.
Would i need to create a number column for each? If so, how would i do that?
Thanks!
Solved! Go to Solution.
@Anonymous
Create the following measure, choose conditional formatting, Background , Select Field Value and choose this meaure:
CF =
VAR __V =
MAX ( table[hardware assigned] )
RETURN
SWITCH ( TRUE (), __V IN { "Yes", "In Transit" }, "Green", __V = "No", "Red" )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @Anonymous ,
Try like below:
step1,create a new measure:
Hardware =
IF (
MAX ( 'Table'[Hardware Assigned] ) = "Yes",
"#1E8449",
IF ( MAX ( 'Table'[Hardware Assigned] ) = "In Transit", "#82E0AA", "#C70039" )
)
Step2, Click the visual column,conditional formatting-Background color:
Step 3, configure like below:
Final get:
About color code ,refer this link :https://www.computerhope.com/htmcolor.htm
To learn more details ,refer:
Conditional Formatting with a Text Field in Power BI
Don't forget to give thumbs up and accept this as a solution if it helped you!!!
Best Regards
Lucien
@Anonymous
Create the following measure, choose conditional formatting, Background , Select Field Value and choose this meaure:
CF =
VAR __V =
MAX ( table[hardware assigned] )
RETURN
SWITCH ( TRUE (), __V IN { "Yes", "In Transit" }, "Green", __V = "No", "Red" )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thanks! It worked for me 🙂
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Check out the July 2026 Power BI update to learn about new features.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 30 | |
| 25 | |
| 25 | |
| 24 | |
| 16 |
| User | Count |
|---|---|
| 54 | |
| 37 | |
| 27 | |
| 24 | |
| 20 |