Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Tableau string calculation


May 26, 2021 Tableau


Table of contents


In this chapter, we'll see calculations involving strings in Tableau. /b10> Tableau has many built-in string functions that can be used to do string operations, such as comparing, connecting, replacing a small number of characters in strings, and so on.
Here are the steps to create a calculated field in which to use string functions.

Create a calculated field

When you connect to the sample supermarket, go to the analysis menu and click Create a calculated field, as shown in the following image.

Tableau string calculation

The calculation editor

The steps above open the calculation editor, which lists all the features available in Tableau. /b10> You can change the down-list value to see only the functions associated with the string.

Tableau string calculation

Create a formula

Let's take a look at sales in the city with the letter "o". /b10> To do this, we create a formula like the one shown below.

Tableau string calculation

Use calculated fields

Now that we see the created field in action, we can drag it to the shelf and the sales field to the column rack. /b10> The following image shows the sales value.

Tableau string calculation