3 Replies Latest reply on Jan 16, 2014 10:40 AM by mark bologna

    Using CONTAINS with wildcards

    mark bologna

      We use a 3-digit code [EP] as an identifier.  I am trying to group a bundle of these together, but I do not want to use the group feature because the data set is dynamic and may not currently include all of the possible 3-digit codes.  Instead, I've written the following formula:

       

      IF [EP]="019" OR

      CONTAINS([EP],"12")

      THEN "PMC"

      ELSE "VSC"

      END

       

      The problem is the placement of the "12" in the 3-digit code is important.  I want to include all 3-digit codes containing "12*" but not 3-digit codes containing "*12"

       

      Can I use a wildcard to tell Tableau to only evaluate the first two characters of the 3-digit code?

       

      Thanks!

      Mark