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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jcamilo1985
Helper III
Helper III

conditional formatting by row

A cordial greeting to all

I think that for some this topic will be familiar even very simple, but even so I have not managed to get the solution, I have no choice but to ask for your help.

I have a power bi matrix similar to the one in the image, what I need is to conditionally format the rows separately, so that the smallest numbers are redder and the most positive are greener, considering the fact that there are lines that can have both positive and negative values.

 

I appreciate any help in advance

 

 

matrix_example.png

 

 

1 ACCEPTED SOLUTION
DivkLearner
Frequent Visitor

Hello @jcamilo1985

 

DivkLearner_0-1730870089620.png

 

I’ve successfully implemented the following steps:

  1. Created a custom column to calculate the sum of all columns.
  2. Created a custom column to compute the ratio of each column's value.
  3. Created a custom column for each ratio's corresponding hexadecimal color.
  4. Applied conditional formatting using the hex values generated from the ratios.

If you're interested, please let me know, and I'd be happy to share the PBIX file with you. The only limitation of my solution is that, as shown in the diagram, it currently only works for negative values. The intensity of the red color decreases as the negative value increases, which is the opposite of what you need.

 

DivKlearner, A bit forward daily. 

Link to my channel on Power BI.

https://www.youtube.com/watch?v=aADx2sPA2D0&list=PLDUIC70xSiVQQpfqGhOjBVDF8IBP2k6ob

 

View solution in original post

2 REPLIES 2
DivkLearner
Frequent Visitor

Hello @jcamilo1985

 

DivkLearner_0-1730870089620.png

 

I’ve successfully implemented the following steps:

  1. Created a custom column to calculate the sum of all columns.
  2. Created a custom column to compute the ratio of each column's value.
  3. Created a custom column for each ratio's corresponding hexadecimal color.
  4. Applied conditional formatting using the hex values generated from the ratios.

If you're interested, please let me know, and I'd be happy to share the PBIX file with you. The only limitation of my solution is that, as shown in the diagram, it currently only works for negative values. The intensity of the red color decreases as the negative value increases, which is the opposite of what you need.

 

DivKlearner, A bit forward daily. 

Link to my channel on Power BI.

https://www.youtube.com/watch?v=aADx2sPA2D0&list=PLDUIC70xSiVQQpfqGhOjBVDF8IBP2k6ob

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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