Forum Discussion

benjamincoady's avatar
6 years ago
Solved

Conditional Formatting on Tables

Hi, 

 

I'm not sure if a recent update has changed this but it's become more difficult to create conditional formatting on tables based on a minus value. 

 

I'm trying to make the background of these minus values in a table red but can't figure it out! It feels like the greater than and less than rule options are the wrong way around. 

 

 I'm probably just being stupid but any help would be great. FYI I've reviewed the help documentation and it didn't really help.

  • Hey mwimberger , 

     

    I think I solved it, basically it need a text field to reference against. It was weird but once I dropped in the Project field (Text) into the table, all of the conditional formatting came to life. Strange and never experienced it before! 

     

    Thanks for your input though, really appreciate it. 

     

    Ben

9 Replies

  • Hi benjamincoady 

     

    It sometimes takes a bit of playing with the settings to get it right, and by deleting the zero in the first box of the custom formatting box ( and bringing Minimum or Maximum into view can help with the understanding of the logic.

     

    Here is an example with some steps to help you with both fonts and backgrounds:

     

     

     

    Hope this helps,

     

    Manfred

    • benjamincoady's avatar
      benjamincoady
      Helper I

      Hi mwimberger

       

      Thanks for taking the time to produce that detailed answer, it's much appreciated. So, I had no problem when the rule sets were set up like yours. I completed an update a few weeks ago and mine now look like this:

       

       

      My rule fields look very different to yours! Any idea?

       

      Cheers!

      • v-juanli-msft's avatar
        v-juanli-msft
        Community Support

        Hi benjamincoady 

        If you want the min value for each group to show red background, you could create measures and use the measure in the conditional formatting.

        min = CALCULATE(MIN('Table'[production]),ALLEXCEPT('Table','Table'[name]))
        
        flag = IF(MAX('Table'[production])=[min],1,0)
        Best Regards
        Maggie
        Community Support Team _ Maggie Li
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.