Forum Discussion

AndroidFactory's avatar
AndroidFactory
New Member
1 year ago
Solved

Value shown as % conditional formatting

Hiya,

 

I have a number of storage locations that are either full or empty in a given zone, I am using the same sums of locations to display the number in the column and the % of the row total.

I am trying to apply conditional formatting to the % columns where if it is below 10% it goes red and above 10% is green but the conditional formatting rule does not even do anything, no formatting applied at all.

The sum of the locations comes from an integer colum where each location is assigned the number 1.

 

When the default grandient formatting is applied it works as expected. How to make Rule one function? Do I need a measure to get the percentage figures so that the formatting works?

 

 

 

 

 

 

Thank you

 

  • I think your rule right now is trying to format the cell based on the COUNT column (i.e for MC1 Empty, it's looking at 886, rather than 21%)

    you can use a measure to format - something like:

    Percentage = DIVIDE(SUM(Table[Count), CALCULATE(SUM(Table[Count]), REMOVEFILTERS(Table[LOC STATUS])))

    and then just apply the rules you have above. 
    Hope this helps

3 Replies

  • Thank you I think it works now! 

    I had a feeling that the value was the issue, even though it was displayed as a % value it was still looking at the base number.

    This just show how much I still need to figure out.

     

    Thank you for your help

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, AndroidFactory 

       

      Thank you for reaching out to the Microsoft Fabric Community Forum.

       

      We appreciate you sharing the issue you encountered and providing a well-reasoned hypothesis. Your ideas are excellent and showcase your deep thought, analytical skills, and unique insights into the problem. If you need further assistance, please feel free to ask questions on the forum again.

       

      Your contributions greatly enhance the positive development of our community.

       

      Wishing you all the best!

       

      Best regards,

      Leroy Lu

  • I think your rule right now is trying to format the cell based on the COUNT column (i.e for MC1 Empty, it's looking at 886, rather than 21%)

    you can use a measure to format - something like:

    Percentage = DIVIDE(SUM(Table[Count), CALCULATE(SUM(Table[Count]), REMOVEFILTERS(Table[LOC STATUS])))

    and then just apply the rules you have above. 
    Hope this helps