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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Conditional Formatting - Matrix Table

Hi Team,

 

I have below table and created Matric table in PI file, now I need to highlight rows wise if value mismatch.

Img1.PNG 

1 ACCEPTED SOLUTION

So if I understood correctly all values in the same category should be the same, otherwise be highlighted. Find attached my proposed solution. I adapted @NikhilChenna 's recommendation into this formula:

Color Logic = IF(SUM('Table'[Cat14]) <> SUM('Table'[Cat15]) || SUM('Table'[Cat14])<> SUM('Table'[Cat16]) || SUM('Table'[Cat15])  <> SUM('Table'[Cat16]), "#FF7F7F", "#FFFFFF") 

You would need to pivot your table though, assuming you don't have other data. 

ray_aramburo_0-1710951948716.png

 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





View solution in original post

8 REPLIES 8
NikhilChenna
Continued Contributor
Continued Contributor

Hi @Anonymous ,

Please follow the below steps to get your conditional formatting, 

  1. Select the matrix visual in Power BI Desktop.
  2. Click on the "Format" pane (paint roller icon) on the right side.
  3. Under the "Values" section, select the field that corresponds to the values in columns 14, 15, and 16.
  4. Scroll down to the "Conditional formatting" section and click on the ellipsis (...) button.
  5. Choose "Background color scales" or "Font color scales" based on your preference.
  6. In the "Minimum" and "Maximum" conditions, set the rules for when the entire row should be colored.
  7. For your case, you want to color the row when the values in columns 14, 15, and 16 do not match. You can use the following steps:
    1. Click on "Add rule." 
    2. Set the condition as "is not equal to." 
    3. Specify the field or value for comparison. You may need to write a DAX expression to compare the values in columns 14, 15, and 16. For example, if your fields are named [Column14], [Column15], and [Column16], the DAX expression could be something like:
       
      =IF([Column14] <> [Column15] || [Column14] <> [Column16] || [Column15] <> [Column16], 1, 0
       
      4. Set the color for when this condition is met.
  8. Click "OK" to apply the conditional formatting.

These steps should help you achieve the desired result of coloring the entire row when the values in columns 14, 15, and 16 do not match. Adjust the DAX expression and conditional formatting rules as per your specific dataset and requirements.

 

Regards,

Nikhil Chenna

 

If your issues resolves select my post as a solution and gives a thumbsup.

Anonymous
Not applicable

Hi @NikhilChenna 
If the 14,15 and 16 is the single column then what is the dax function, Please advise

Hi @Anonymous ,

You can try the below ,

=IF([Value] <> EARLIER([Value]), 1, 0)

Regards,

Nikhil Chenna

If your issues resolves select my post as a solution and gives a thumbsup.

ray_aramburo
Super User
Super User

What would be the criteria to determine if a value is a mismatch?





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





Anonymous
Not applicable

Hi @ray_aramburo 
Entire row highlight amber color

 

Which values do you want to compare I meant?





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





Anonymous
Not applicable

Img2.PNG

So if I understood correctly all values in the same category should be the same, otherwise be highlighted. Find attached my proposed solution. I adapted @NikhilChenna 's recommendation into this formula:

Color Logic = IF(SUM('Table'[Cat14]) <> SUM('Table'[Cat15]) || SUM('Table'[Cat14])<> SUM('Table'[Cat16]) || SUM('Table'[Cat15])  <> SUM('Table'[Cat16]), "#FF7F7F", "#FFFFFF") 

You would need to pivot your table though, assuming you don't have other data. 

ray_aramburo_0-1710951948716.png

 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.