4 Replies Latest reply: Mar 1, 2018 3:12 PM by Ale Kong RSS

    Color in Expression

    Ale Kong

      Newbie here working on an expression in a table. If I want the Yes to be colored green, the No to be colored red, and the N/A to be colored yellow, how do I adjust the below expression?

       

      If(Column(1) < Column(2),
      'YES',

      if(Column(1) > Column(2),
      'NO',

      if (column(1) = column(2),
      'N/A'

      )))

       

      Thanks,

      Ale

        • Re: Color in Expression
          Akshaya Aditya

          Hi Ale,

           

          You can use the same expression with little change in the background color for the expression. Below is the change for your reference.

          Capture_312018.PNGIf(Column(1) < Column(2),
          RGB(0,255,0),

          if(Column(1) > Column(2),
          RGB(255,0,0),

          if (column(1) = column(2),
          RGB(255,0,255)

          )))

            • Re: Color in Expression
              Ale Kong

              I still need the text "Yes", "No", or "NA" to show up plus background color. How would you edit the expression to include both color and text?

                • Re: Color in Expression
                  Akshaya Aditya

                  Hi Ale,

                  Follow the below steps:

                   

                  Step1:

                  In the expression definition, you include below expression

                  If(Column(1) < Column(2),
                  'YES',

                  if(Column(1) > Column(2),
                  'NO',

                  if (column(1) = column(2),
                  'N/A'

                  )))

                   

                  Step2:

                  In the left Pane of expression tab, expand the expression as shown in the below snapshot and click the background color and under itsCapture_312018.PNG definition write this

                   

                  If(Column(1) < Column(2),
                  RGB(0,255,0),

                  if(Column(1) > Column(2),
                  RGB(255,0,0),

                  if (column(1) = column(2),
                  RGB(255,0,255)

                  ))).

                   

                  This will give you text and color both.

                   

                  Thanks.