2 Replies Latest reply on Sep 24, 2018 8:08 AM by kwan.zhang

    if statements based on specific column being equal

    kwan.zhang

      Hi, I want to make a calculated field that'll use the table below and output the following for each number.

      I was thinking of 2 options, but not sure how to code it.

      "while the number is 1, if color = red AND color = blue then "red and blue"

      or

      "if (the color = red then number) = (color = blue then number) then "red and blue"

       

      desired output:

      1 - red

      2 - red and blue

      3 - red

      4 - blue

      5 - red

      6 - red and blue

       

      Input:

      number

      color

      1

      red

      2red
      2blue
      3red
      4blue
      5red
      6red
      6red