Forum Discussion

Element115's avatar
Element115
Icon for Memorable Member rankMemorable Member
4 years ago
Solved

Background color rules for table cells not working

Desktop vs July 2022

 

Brief description:  Cell elements background color does not cut off color at the right boundary when using percentages, which are specificied in the settings as whole numbers > 0 and not decimals between 0 and 1. If using decimal values instead, it works even less.  

 

The 3 screenshots are self-explanatory and you will see immediately the nature of the problem.

 

 

 

 

  • you need to use 0.50 as an example  for percentages I think. ie 50% is 0.50 have you tried that?

  • Hi  Element115 ,

    According to the snapshot, you select Percent in the dropdown, the Percent in this place does not mean percentage as in the datatype option.  It means you’re setting the rule boundaries as a percent of the overall range of values from minimum to maximum.

    For example in the below sample, the 0 Percent means the minmum value -50%, the 50 Percent should be (50%+(-50%))/2=0, so the backgroud color of value from -50% to 0 get red, it's correct.

    Instead, if you want to get the correct number value, you should select Number in the dropdown like this:

    Refer to this official document: Apply conditional table formatting in Power BI - Power BI | Microsoft Docs

     

    Best Regards,

    Kaly

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

3 Replies

  • Kaly's avatar
    Kaly
    Icon for Resolver II rankResolver II

    Hi  Element115 ,

    According to the snapshot, you select Percent in the dropdown, the Percent in this place does not mean percentage as in the datatype option.  It means you’re setting the rule boundaries as a percent of the overall range of values from minimum to maximum.

    For example in the below sample, the 0 Percent means the minmum value -50%, the 50 Percent should be (50%+(-50%))/2=0, so the backgroud color of value from -50% to 0 get red, it's correct.

    Instead, if you want to get the correct number value, you should select Number in the dropdown like this:

    Refer to this official document: Apply conditional table formatting in Power BI - Power BI | Microsoft Docs

     

    Best Regards,

    Kaly

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • vanessafvg's avatar
    vanessafvg
    Icon for Community Champion rankCommunity Champion

    you need to use 0.50 as an example  for percentages I think. ie 50% is 0.50 have you tried that?

    • Element115's avatar
      Element115
      Icon for Memorable Member rankMemorable Member

      Yes, but with Percent selected and that does not work. But you are right when Number is selected it works, as Kaly suggested. Thanks everyone!