May 26, 2021 Tableau
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.
When you connect to the sample supermarket, go to the analysis menu and click Create a calculated field, as shown in the following image.
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.
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.
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.