Tableau String Calculations
Tableau has many inbuilt string functions used for string manipulation such as concatenating, comparing, and replacing few characters from a string, etc.
Here are some steps to create a calculation field and use string function in it:
How to Create Calculated Field
- After connecting to a data source such as Sample superstore .
- Then, go to the Analysis menu.
- And click ’ Create Calculated Field ’ as shown in the below image.
Calculation Editor in Tableau
The above process opens a calculation editor that contain all the functions available in Tableau.
You can change the dropdown value and only see the related functions to strings.
Create a Formula
- If you want to find out the Sales in the Cities , that contain the letter " A ", create the formula as shown in the below image.
How to Use the Calculated Field
To see the created field into a graphical representation, you can drag City field into the Rows shelf and drag the Sales field into the Columns shelf.
The below image shows the Sales values for Cities: