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
sarah2_williams
Helper III
Helper III

Conditional Formatting colours using Dax

Hi all,

 

Just after a bit of DAX help - or suggestions on any other way I can achieve this.. I have a matrix similar to the below: 

I want the background of the Cells to be a certain colour based on the Item. e.g. Trainers and Boots = Red, T-shirts and Jumpers = Blue, Trousers and Shorts = Yellow.

 

Item201920202021
Trainers101010205622

Boots

200254563
T-shirts30036952
Jumpers25515638546
Trousers1252325587
Shorts235223362536

 

I have created a SWITCH measure ( =SWITCH(SELECTEDVALUE(Sales[Item]), "Trainers", "Red", "Boots", "Red", "T-shirts", "Blue" etc) so that I can assign the values a certain background colour using conditional fomatting- but I want the actual Item cells to have the background colour..

 

Any suggestions welcome 

 

thanks

Sarah

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

You mean that instead of this

 

lbendlin_0-1648944192865.png

 

 

you want the row header background color changed?   Bad news I'm afraid.

 

Microsoft Idea (powerbi.com)

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

You mean that instead of this

 

lbendlin_0-1648944192865.png

 

 

you want the row header background color changed?   Bad news I'm afraid.

 

Microsoft Idea (powerbi.com)

Yes.. I wanted just the row headers to be coloured.

 

I've had no luck finding a solution. 

Thanks

Hi @sarah2_williams 

 

Currently the conditional formatting feature isn't applied on the row/column headers. It is only applied on Values fields. I'm afraid there is no such solution or workaround to format their background at present. 

 

There are some similar ideas about this requirement you can vote up:

Microsoft Idea - Conditional Formatting of Row Headers in Matrix

Microsoft Idea - conditional formatting

Microsoft Idea - Condititonal Formatting for Row Header

 

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

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.