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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sarah2_williams
Helper III
Helper III

Conditional formatting the colour of one company in list.

Hi all,

 

Apolgies, i'm not sure if i'm posting this in the right section..

 

I'm not sure if this is possible but it seems like it should be somehow.

 

I have a Matrix is PowerBi which has the following columns>   "Company" "Measure 1" "Measure 2" "Measure 3"

 

I want my company to always appear as a different colour font to all the other comapnies in the matrix that we are comparing to, regardless of the 3 numerical values in the other colums.

 

I can create the conditional formatting based on the values, to highlight things like highest value company, lowest value, value in range etc. but I just want the colour on the text under company. 

 

Before we moved to PowerBi I would just select the cell in Excel and change the colour of the font.. that doesn't seem to be as easy in PowerBi!

 

Any help greatly appreciated.

 

Thanks

S

1 ACCEPTED SOLUTION

@sarah2_williams , I am confused now.

In matrix you can not color row or column(pivot) columns.  That you can do in a table.

 

You can color measures(values) and each measure you have to color.

 

You can use rule based coloring. or have measure to create complex color. Like last example

company color = if(Max([company Name]) = "ABC" ,"Green", "white")

 

or

 

Color = if(FIRSTNONBLANK('Table'[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK('Table'[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")

color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)

 

Can you share some kind of screenshot.

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

4 REPLIES 4
amitchandak
Super User
Super User

@sarah2_williams , create a color measure like the one given below and use that in conditional formatting of all measures. Use "field value" Option

 

company color = if(Max([company Name]) = "ABC" ,"Green", "white")

 

refer for steps

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

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

I actually found your link online already! 

 

the only problem I had with it was that I don't want the values highlighted, just the company name which I couldn't achieve using your step-by-step, Unless I have misunderstood?

 

Thanks

Sarah

 

@sarah2_williams , I am confused now.

In matrix you can not color row or column(pivot) columns.  That you can do in a table.

 

You can color measures(values) and each measure you have to color.

 

You can use rule based coloring. or have measure to create complex color. Like last example

company color = if(Max([company Name]) = "ABC" ,"Green", "white")

 

or

 

Color = if(FIRSTNONBLANK('Table'[Year],2014) <=2016 && AVERAGE(Sales[Sales Amount])<170
,"lightgreen",if(FIRSTNONBLANK('Table'[Year],2014)>2018,"red","yellow"))
Color sales = if([Sales Today] -[sales yesterday]>0,"green","red")

color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)

 

Can you share some kind of screenshot.

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

Thank you,

 

If it is not possible that is fine, I will just colour the measures in the Matrix.

 

Thank you for your help

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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.

Top Solution Authors