Forum Discussion

jcamilo1985's avatar
jcamilo1985
Helper III
1 year ago
Solved

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

 

 

 

 

  • Hello jcamilo1985

     

     

    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

     

2 Replies