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

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

Reply
Bergh
Helper II
Helper II

Bakgrund and number colors!!

Hello. If I have a table with 10 columns and in each of these columns there are the numbers 1 to 6. If I now wanted to change the background color and the numbers to the colors you see in the picture. How to do it easiest?
Thanksfärger powerbi.jpg

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Bergh , Create a measure like

Switch(Max(Table[Column]) ,  // or Sum(Table[Column])

1, "#FAFAFA" ,

// Add other condition

)

 

Use this measure in conditional formatting using the field value option.

 

If you need to do it for each column value, you need that many measures

 

How to do conditional formatting by measure and apply it to pie? : https://youtu.be/RqBb5eBf_I4

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Bergh ,

 

You will need to set conditional formatting for each column.

You could manually set conditional formatting Rule to return different colors depend on the column values.

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#color-... 

Or you could create a measure like amitchandak showed above and use it as conditional formatting Value.

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting#color-... 

 

Best Regards,

Jay

 

amitchandak
Super User
Super User

@Bergh , Create a measure like

Switch(Max(Table[Column]) ,  // or Sum(Table[Column])

1, "#FAFAFA" ,

// Add other condition

)

 

Use this measure in conditional formatting using the field value option.

 

If you need to do it for each column value, you need that many measures

 

How to do conditional formatting by measure and apply it to pie? : https://youtu.be/RqBb5eBf_I4

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
tamerj1
Super User
Super User

@Bergh 

The way I know need to do measure by measure unless this visual is a matrix that contains only one measure

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.