5 Replies Latest reply on Jul 16, 2013 8:30 AM by Alex Kerin

    Multiple/overlapping values in a case statement?

    Amy Song

      Hi, I have dimensions that I would like to group into different groups but the issue is that some may need to be in multiple groups.  For example, my data:

       

      Dimension

      a

      b

      c

      d

      e

       

      In SQL, I can put different combinations of them in groups such as:

       

      case when dimension in ('a','b','c') then 'Group 1'

      when dimension in ('b','c','d') then 'Group 2'

      wen dimension in ('a','e') then 'Group 3' else null end

       

      ...etc

       

      However it looks like the case statement in Tableau does not allow for multiple values, and I was unable to use the if statement since the subsequent statements call for "elseifs" which mutually excludes the values.  Please let me know if I am missing an obvious syntactical method to do this!  Thanks!  :)