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

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

Reply
SelflearningBi
Helper III
Helper III

How to create background color or icon of a value in cell

Please help, I got such cell. I would like to use green color and icon to ON TIME. Dark red to 4 weeks +, and light red to 4 weeks and so on...
I found the conditional background or icon only avaiable to value and count/distinct count, not sure how to deal with word, like ON TIME,  1 WEEK, 2 WEEK

SelflearningBi_3-1655974021314.png

 

 

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @SelflearningBi 

 

You can create a measure with color hex codes for conditional formatting. For example, 

color =
SWITCH (
    SELECTEDVALUE ( 'Table'[Postone Status] ),
    "ON TIME", "#66cdaa",
    "4 WEEKS+", "#aa0022",
    "4 WEEKS", "#ee3355"
)

When setting up the conditional formatting, select Field Value for Format style and select above measure for "What field should we base this on?"

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
truptis
Community Champion
Community Champion

Hi @SelflearningBi ,

You can try conditional formatting on background colours & icons.
step 1 - create a column such that if postone status = "1 week" then 1, if "2 week" then 2 and so on... then click on fx(screenshot)

truptis_0-1656329431607.png

and then put the conditions of colours(screenshot):

truptis_1-1656329633585.png

 

You can also refer this for logic purpose: https://community.powerbi.com/t5/Desktop/Dynamic-Card-Visual-s-Color/m-p/2400119#M861023  

@SelflearningBi -> Please hit the thumbs up & mark it as a solution if it solves your query. Thanks. 

 

v-jingzhang
Community Support
Community Support

Hi @SelflearningBi 

 

You can create a measure with color hex codes for conditional formatting. For example, 

color =
SWITCH (
    SELECTEDVALUE ( 'Table'[Postone Status] ),
    "ON TIME", "#66cdaa",
    "4 WEEKS+", "#aa0022",
    "4 WEEKS", "#ee3355"
)

When setting up the conditional formatting, select Field Value for Format style and select above measure for "What field should we base this on?"

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.