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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
Resolver I
Resolver I

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
Resolver I
Resolver I

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.