English 中文(简体)
Tableau Tutorial

Tableau Data Sources

Tableau Worksheets

Tableau Calculations

Tableau Sort & Filters

Tableau Charts

Tableau Advanced

Tableau Useful Resources

Selected Reading

Tableau - String Calculations
  • 时间:2024-11-05

Tableau - String Calculations


Previous Page Next Page  

In this chapter, you will learn about calculations in Tableau involving Strings. Tableau has many inbuilt string functions, which can be used to do string manipulations such as - comparing, concatenating, replacing few characters from a string, etc. Following are the steps to create a calculation field and use string functions in it.

Create Calculated Field

While connected to Sample superstore, go to the Analysis menu and cpck ‘Create Calculated Field’ as shown in the following screenshot.

Create calculation

Calculation Editor

The above step opens a calculation editor which psts all the functions that is available in Tableau. You can change the dropdown value and see only the functions related to strings.

string calc 1

Create a Formula

Consider you want to find out the sales in the cities, which contain the letter “o”. For this, create the formula as shown in the following screenshot.

string calc 2

Using the Calculated Field

Now, to see the created field in action, you can drag it to the Rows shelf and drag the Sales field to the Columns shelf. The following screenshot shows the Sales values.

string calc 3 Advertisements