Forum Discussion

WJ876400's avatar
WJ876400
Helper IV
7 years ago
Solved

color Formatting

 

Hi

 

I have two columns on a table, like below. I want to color the column hours completed so that if the hours are the same or higher then target hours it is green and if it is below the target hours its is red. Is this possible to do,

 

Thanks for your help

 

 

 

 

 

 

 

  • HI WJ876400 ,

    In your scenario, we can create a measure to judge the situation like below: 

    Measure =
    IF ( MIN ( 'Table'[Target Sales] ) > MIN ( 'Table'[Sales Completed] ), 1, 0 )

    Then in the Conditional Formatting, we can set the rule for the Sales Completed column:

    Then click the Advanced controls, set the rule:

    The result will like below:

    Best Regards,

    Teige

4 Replies

  • TeigeGao's avatar
    TeigeGao
    Solution Sage

    HI WJ876400 ,

    In your scenario, we can create a measure to judge the situation like below: 

    Measure =
    IF ( MIN ( 'Table'[Target Sales] ) > MIN ( 'Table'[Sales Completed] ), 1, 0 )

    Then in the Conditional Formatting, we can set the rule for the Sales Completed column:

    Then click the Advanced controls, set the rule:

    The result will like below:

    Best Regards,

    Teige

    • WJ876400's avatar
      WJ876400
      Helper IV

      Hi Teige

       

      Do you create the measure on a different field or create a new measure on the tbale?

       

      I created a new measure on the table and then put it un the values area but it made my table go blank. Could you just run through the steps before creating the measure then where to add it into a table for it to work.

       

      thanks

      • TeigeGao's avatar
        TeigeGao
        Solution Sage

        Hi WJ876400 ,

        I make a measure on the same table.

        Best Regards,

        Tiege