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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PBIUWO
Helper III
Helper III

Is it possible to do Conditional Formatting (Highlighting) selected rows in a Matrix Table?

Is it possible to do Conditional Formatting (Highlighting) only the Rows that are "Selected" from a filter in a Matrix Table?

 

I created a page where the user can select item codes from a filter. With a measure in the Matrix Table, it also populates related item codes and its sales history in the same table.

 

As this might look confusing, I'm wondering if it's possible to do conditional formatting on the Matrix for only the items that are selected in the filter so the user can distinguish the related items and selected items. 

Under conditonal formatting, I only see it availabe for the "Values". I want to highlight the Item, and its under "Rows"

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @PBIUWO ,

 

If you add a measure that returns for example a 1 for all the values that are selected you can have that condittional formatting set to the specific row, however there are some questions regarding how you have you visualizaitons setup.

 

Has you can see in attach file the values of categories selected on the slicer are with a different colour:

MFelix_0-1612190859537.png

 

How do you select the values for the item codes? Is it a related table or the same one?

Does the matrix changes with the slicer changes?

 

Can you share a sample file?


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @PBIUWO ,

 

If you add a measure that returns for example a 1 for all the values that are selected you can have that condittional formatting set to the specific row, however there are some questions regarding how you have you visualizaitons setup.

 

Has you can see in attach file the values of categories selected on the slicer are with a different colour:

MFelix_0-1612190859537.png

 

How do you select the values for the item codes? Is it a related table or the same one?

Does the matrix changes with the slicer changes?

 

Can you share a sample file?


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



amitchandak
Super User
Super User

@PBIUWO , for this you have to use an independent item table. so that it does not filter the row.  Then you have to do formatting of all columns/values, as there is no row formatting in Power BI

 

Do this for all measures/values. In conditional formatting use "field value" and use this measure

color measure = if(max(Table[item]) in values(item[item]), "green", "white")

 

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
Greg_Deckler
Community Champion
Community Champion

@PBIUWO - Not sure, can you post a mocked-up image of what you are looking to achieve?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.