Search code examples
tableau-apitransformation

Custom Split or Transform values in Tableau column


I have a Location column within Tableau that contains data that look like this:

GVA - Equi GV2  Geneva
GVA - Equi GV2  Geneva
GVA - Equi GV2  Geneva
AMS - Equi2 AM1 Amsterdam
AMS - Equi2 AM1 Amsterdam

Is there a way to remove the prefix to just show the location?

Desired output:

Geneva
Geneva
Geneva
Amsterdam
Amsterdam

I have tried going into Tableau on the main page and performing a custom split. However, when doing this, I do not see any changes:

enter image description here


Solution

  • How about defining your custom Split as the Last 1 column (instead of the First)?

    Of course if a location has a space in the name, you'll only see the last word.

    You can also use the REGEXP_EXTRACT() function to specify a more sophisticated pattern.