2 Replies Latest reply on Nov 29, 2018 2:04 AM by Matthew Han

    Can we LEFT JOIN on multiple columns?

    Matthew Han

      HI.

       

      I need to create another column Type with values as "bird" or "dog" or "cat", depending on certain conditions in columns A, B and C being fulfilled.

      I am thinking if there is another way other than using IF and ELSE IF clauses in calculated fields. eg, IF A = 1 and B = 0 and C = 0 THEN "bird" END.

       

      I have experimented with a  table array with columns A, B, C, Type and then doing a LEFT join on columns A B C with the table from the data source, but it didn't work. Null values were returned.

      [ A B C Type ]

      [ 1 0 0 bird ]

      [ 1 0 1 dog ]

      [ 1 1 0 cat ]

       

      What did I do wrong? Is there a way to left join on multiple columns so that it returns the value which are matched in a new column? Any better solutions? Thanks!

       

      The above is just an example. The actual table array is 59 rows long. So if i were to write a IF and ELSEIF clause, it will be very tedious process.