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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.