O'Reilly logo

Tableau Cookbook – Recipes for Data Visualization by Shweta Sankhe-Savale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating string calculations

There are times when we are required to do some manipulations on fields that are stored as strings. Typical calculations that we may do on strings are as follows:

  • Concatenating separate strings into a single string or separate a string into smaller substrings
  • Changing the letter case (upper case to lower case and vice versa)
  • Extracting parts of the string to find certain substrings or find the position of a particular character or trim the string from a particular point

In the following recipe, let's do some string manipulations to create new calculated fields.

Getting ready

For the following recipe, we will use the Customer Name field from the Orders sheet from Sample - Superstore.xlsx data and we will continue working ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required