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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
melimob1
Helper I
Helper I

Conditional Formatting a Matrix with multiple columns

Hi, 

I have a matrix table in pbi and I want comparing for each company (LOB) which product is the max %.

Something like this:

 

melimob1_0-1732202204431.png

 

I have a summary table where there is a column to denote by LOB and product, which is the dominant.

I'm stuck on creating the conditional format to apply as a field rule however.

would be grateful for any advice?

 

many thanks

 

1 ACCEPTED SOLUTION
Bibiano_Geraldo
Super User
Super User

Hi @melimob1 ,

If i understood well, you need to create a measure to rank the countries, something like this:

Rank = 
RANKX(
    ALL(financials[Country]),
    [Sales Mix %],
    ,DESC
)

 

Now you can add a background color using conditional format to your % column as shown bellow:

Bibiano_Geraldo_0-1732217195696.png

 

Use these rules and click OK:

Bibiano_Geraldo_1-1732217373802.png

 

Now your result should look like this:

Bibiano_Geraldo_2-1732217439914.png

 

 

View solution in original post

5 REPLIES 5
Bibiano_Geraldo
Super User
Super User

Hi @melimob1 ,

If i understood well, you need to create a measure to rank the countries, something like this:

Rank = 
RANKX(
    ALL(financials[Country]),
    [Sales Mix %],
    ,DESC
)

 

Now you can add a background color using conditional format to your % column as shown bellow:

Bibiano_Geraldo_0-1732217195696.png

 

Use these rules and click OK:

Bibiano_Geraldo_1-1732217373802.png

 

Now your result should look like this:

Bibiano_Geraldo_2-1732217439914.png

 

 

that dear friend is a beautiful thing!!! 
worked like a charm first time (I just change the field I wanted to rank against). 

I can't thank you enough, finally... something was simple 😉 

ps.  I will post something else if I need to but in another matrix, I also need to colour code one column if the value on that row doesn't match with another colum (same row).. shall I do a new post for tracking? or is this something easy?

Happy that it worked,
If your create a post, just @me to to let me know and dont forget to show your expected results in the post.

 

Thank you.

 

hey, I got fancy also as used your rank measure just to show an icon for the top as well as colour! thank you again!

😀😀😀The sky is limit.

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.