Skip to main content

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

3 answers
  1. Jan 16, 2014, 5:26 PM

    I solved my own problem!  Right after I posted this, I found an unrelated discussion revolving around the STARTSWITH function.  This will work perfectly for my needs.  Leaving it here in case others run into this issue in the future.

0/9000