In Tableau, working with data isn’t always clean or simple. Many times, we get data where multiple values are stored in a single column.
For example, a column may contain values like “India-Karnataka-Bangalore” or “John Doe”, where multiple pieces of information are combined into one field.
In such cases, it becomes difficult to analyze or visualize the data properly. To solve this problem, Tableau provides a powerful string function called SPLIT.
In the Tableau dataset, we also have text fields that contain multiple information in a single column. For example, we have a field with values like “East-California-2024”, where region, state, and year are combined into a single text string.
In such cases, splitting the text into separate parts is required for data visualization. For this requirement, we can use the Tableau SPLIT() function. It allows us to split a single string into multiple parts using a hyphen (-), a comma (,), or a space.
In this tutorial, I’ll explain what the Tableau SPLIT Function does, its syntax, and a few examples to use it in real Tableau scenarios.
Tableau SPLIT Function – Syntax, Examples
In Tableau, the SPLIT() function splits text into parts based on a specified delimiter. It returns the part of the text specified by an index number.
For example, we can define a condition in a formula using the SPLIT function so that when there is a “-” in the text, it will be divided.
Syntax for using the SPLIT() function:
SPLIT(string, delimiter, token_number)The parameters used in the syntax above are as follows.
- string – The text field or value we want to split.
- delimiter – The character or symbol that separates each part; it can be (-), (” “), or blank.
- token_number – The position of the part we want to extract.
Use the SPLIT() function in Tableau
In the examples below, we will see how to use the SPLIT() function in Tableau to split text or string field values.
For the data visualization and to show the use case of the SPLIT() function, we use the dataset below. Create an Excel file with values similar to those shown in the image below.

Example 1: Splitting a Region Dimension Field Using the SPLIT() Function
In this example, we will use the SPLIT() function to split the region or location values that are divided using the hyphen (-), like:
East-California-2024
West-Texas-2023
North-Washington-2025To extract the Region, State, and Year separately, we can create the following calculated fields using the SPLIT() function:
- To extract region:
SPLIT([Location Info], "-", 1)- To extract state:
SPLIT([Location Info], "-", 2)- To extract year:
SPLIT([Location Info], "-", 3)The above fields will return values using the deimeter and token number. For example, the first one will return region, the second formula will return state, and the third one will return year values such as 2023-2024.
Now, to visualize the data, add the calculated field to the Rows and Sales to the Column. For example, if we add the Region calculation to the Column, then it will show the extracted Region value.

In a similar way, by using the state and year calculation, we can extract and display the values.
For extracted state values:

For extracted year values:

This way, we can visualize the measure values by the extracted values from the dimension values using the SPLIT () function in Tableau.
Example 2: Extracting the Last Value from a String Using the SPLIT() Function
In this example, we will extract the last string value from the dimension value, separated by a hyphen (-), such as “USA-New York-New York City“. In this, we will extract the last part using a negative index(-1).
Now, create a calculated field using the formula below to extract the last values from the Address field.
SPLIT([Address], "-", -1)To create a data visualization, add the sales to the Text and calculated field to the Rows.
With this, we will get the last values from the address “USA-New York-New York City” as New York City.

This way, we can use the Tableau SPLIT() function with a negative index (-1) to extract the last value from a string value.
Example 3: Using SPLIT for Email Domains in Tableau
In this example, we use the SPLIT function to extract the values from the emails. For example, we have the email johndoe@gmail.com; using the SPLIT, we can extract the domain name “gmail” or the company name.
For this, create a calculated field using the formula below.
SPLIT([Email], "@", 2)To view the extracted domain name from the emails, add the calculated field to the Rows and Emails to text for comparison.
Now, we can see the extracted domain name for each email address.

This way, we can use the Tableau SPLIT() function to extract the values from the emails. With this, we can also create a pie chart showing which email providers the customers use most.
Frequently Asked Questions
Q1: What is the SPLIT function in Tableau?
It splits a string into parts using a delimiter
Q2: Can SPLIT return multiple values?
No, one value per calculation
Q3: What is a delimiter?
Character that separates values
Q4: Can I use a negative index?
Yes, to get values from the end
Conclusion
The SPLIT function in Tableau is a powerful tool that helps in breaking complex text data into meaningful parts. It plays an important role in data cleaning, transformation, and analysis.
By understanding how to use delimiters and token numbers, you can easily extract the required information and build better dashboards.
If you are working with real-world datasets, mastering the SPLIT function will significantly improve your efficiency and data analysis skills. Practice with different examples and combine them with other functions to get the best results.
You may also like to read:
- Tableau RANK() Function
- Tableau LOOKUP() Function
- ATTR() Function in Tableau
- Convert Data Type in Tableau
- Order of Operations in Tableau
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.