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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

Greg_Deckler
Super User
Super User

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


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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