4 Replies Latest reply on Dec 11, 2017 2:36 PM by Shinichiro Murakami

    Write a formula to include multiple / not mutually exclusive conditions

    A C

      When I tried to write a formula on the Condition column to group all information into three categories,Good, Neutral, and Bad and ensure all three categories include all possible combinations, my formula didn't work out. What I want to see is that all conditions starting with Good including "Good", "Good, Neutral", "Good, Bad","Neutral, Good" etc. fall under the Good category in the formula. Same thing with Neutral and Bad.

       

      However, the current formula as below worked out more like a tunnel down. The end result for the Bad category, my last ELSEIF formula in Tableau contains only Bad, but not "Bad, Neutral" or "Bad, Good". Any ideas on the formula?  

       

      IF CONTAINS(UPPER([Condition]), 'Good') THEN 'Good'

      ELSEIF CONTAINS(UPPER([Condition]), 'Neutral') THEN 'Neutral'

      ELSEIF CONTAINS(UPPER([Condition]), 'Bad') THEN 'Bad'

      ELSE 'N/A'

      END