How to Split Data in Tableau

Cody Schneider••7 min read

Ever pull your data into Tableau only to find that important details are mashed together in a single column? Think of a "Full Name" column when you need to analyze by last name, or a "Location" field with city, state, and zip all crammed together. You can't build effective charts or filters with that. This article walks you through several ways to split that data directly within Tableau, from a simple one-click solution to more powerful custom formulas.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

What is Splitting and Why Do You Need It?

Splitting is the process of breaking a single column of text data in your data source into multiple columns. Instead of one dimension like "John Smith," you get two dimensions: "First Name" (John) and "Last Name" (Smith). This simple transformation unlocks deeper analysis.

You'll find yourself needing to split data in many common scenarios, including:

  • Full Names: Separating "First Name," "Middle Initial," and "Last Name."
  • Geographic Data: Breaking down "City, State, Zip" into separate fields for mapping or filtering.
  • Product Codes or SKUs: Isolating parts of a SKU like "SHIRT-BLUE-XL" into "Category," "Color," and "Size."
  • Order IDs: Extracting a date or customer segment from a composite ID like "2024-CUST123-ORDER45".
  • Email Addresses: Splitting the username from the domain to analyze which companies your customers are from.

By splitting these columns, you create distinct, usable dimensions that can be used for grouping, filtering, hierarchies, and building far more detailed and insightful visualizations.

Method 1: The Easy Way with Tableau's Built-in Split Feature

For most common splitting tasks, Tableau has a built-in feature that does the hard work for you. It automatically detects common separators (like spaces, commas, or hyphens) and creates new columns in seconds. There are two ways to use it: the Automatic Split and the Custom Split.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Using the Automatic Split

This is your go-to first step. Tableau will intelligently guess the delimiter and perform the split. It's remarkably effective for straightforward data.

Let's say you have a "Customer Name" field with data like "Anna Davis," "Ben Carter," and "Carla Espinoza."

  1. Go to the Data Source tab or the sheet view. In the side pane, find the field you want to split (e.g., 'Customer Name').
  2. Right-click on the dimension pill.
  3. Navigate to Transform > Split.

That's it! Tableau will analyze the data, identify the space as the delimiter, and automatically create two new fields: "Customer Name - Split 1" (which will contain "Anna", "Ben", "Carla") and "Customer Name - Split 2" (containing "Davis", "Carter", "Espinoza"). You can now rename these to "First Name" and "Last Name" for clarity.

Using the Custom Split

Sometimes, the Automatic Split doesn't get it quite right, or your data has a unique delimiter. The Custom Split gives you more control over the process.

Imagine you have a Product ID field formatted like "PROD_FINANCE_US" and you want to separate the components using the underscore.

  1. Right-click on your dimension (e.g., 'Product ID').
  2. Navigate to Transform > Custom Split....
  3. A dialog box will appear. In the "Use the separator" field, type the delimiter you want to use. In this case, you would type _ (an underscore).
  4. Choose how you want to split the columns:
  5. Click OK.

Tableau will now generate the new columns based on your custom instructions. This is perfect for when data has multiple delimiters and the automatic function gets confused, or when you only need a specific piece of the original string.

Method 2: Gaining Full Control with Calculated Fields

The built-in split is fast, but it's not always flexible enough. What if your delimiter is inconsistent, or you need to extract data from the middle of a string based on a more complex rule? This is where calculated fields shine. The most useful function for this is unsurprisingly named SPLIT().

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Using the SPLIT() Function in a Calculation

The SPLIT() function gives you precision. It allows you to specify the string, the delimiter, and which part of the split string you want to return (the "token").

The syntax is: SPLIT(string, delimiter, token_number)

  • string: The field you're splitting (e.g., [Location]).
  • delimiter: The character separating the data (e.g., ",").
  • token_number: An integer indicating which piece you want. 1 is the first piece, 2 is the second, and so on. A negative number like -1 grabs the last piece.

Example: Splitting "City, State"

Let's say you have a Location field formatted as "Seattle, Washington". To get the city, you'd create a new calculated field named "City".

  1. Right-click anywhere in the Data pane and select Create Calculated Field.
  2. Name your field "City".
  3. Enter the following formula: SPLIT([Location], ",", 1).
  4. Click OK.

This tells Tableau to look at the [Location] field, find the comma, and return the first part of the string before it.

To get the state, you'd create another calculated field named "State" with this formula:

TRIM(SPLIT([Location], ",", 2))

In this second formula, we used TRIM() to remove any pesky leading spaces that might be left over after splitting on the comma (e.g., " Washington"). This kind of data cleaning is a great habit to get into when using calculated fields.

A More Manual Approach: Combining FIND(), LEFT(), and RIGHT()

For even more complex scenarios where SPLIT() might not be enough, you can manually find the delimiter and extract the text to its left or right. This gives you absolute control.

Let's use an email address, "sample-user@domain.com", as our example.

1. Finding the Delimiter with FIND()

The FIND() function returns the numeric position of a character within a string. FIND("[Email]", "@") would return 12, as the "@" symbol is the 12th character.

2. Extracting the Username with LEFT()

The LEFT() function grabs a specified number of characters from the beginning of a string. We can combine it with FIND() to get everything before the '@'.

Calculated Field Name: Email Username

LEFT([Email], FIND([Email], "@") - 1)

This formula finds the position of the "@" symbol (12) and subtracts 1 to exclude it. Then, LEFT() takes the first 11 characters, resulting in "sample-user".

3. Extracting the Domain with RIGHT() and LEN()

Extracting the part after the delimiter is slightly trickier. We need the RIGHT() function, which pulls from the end of the string, and the LEN() function, which gives us the total length of the string.

Calculated Field Name: Email Domain

RIGHT([Email], LEN([Email]) - FIND([Email], "@"))

This formula calculates the total length of the email and subtracts the position of the '@' symbol. This gives us the exact number of characters in the domain name ("domain.com"). The RIGHT() function then grabs that many characters from the end of the string.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Best Practices After Splitting Your Data

Splitting your data is just the first step. To ensure your analysis is accurate and your workbook stays organized, follow these best practices:

  • Review the Results: After you split, quickly scan the new columns for any null values or errors. This might indicate that some rows in your original data had an inconsistent format that the split couldn't handle.
  • Rename Your New Fields: Tableau's default names like "Product ID - Split 1" aren't very descriptive. Right-click and rename them immediately to something intuitive like "Product Category."
  • Check and Set Data Types: Tableau might misinterpret a numeric string (like a zip code or a year) as a number to be aggregated. Click the icon next to the field name (Abc, #, etc.) and change the data type as needed (e.g., from Number to String, or vice versa).
  • Hide the Original Field: Once you've confirmed the new fields are correct, you can right-click the original, unsplit field and select Hide. This cleans up your data pane and prevents accidental use of the old field in your visualizations.

Final Thoughts

Splitting messy data in Tableau is a fundamental skill that turns chaotic text columns into clean, usable dimensions for analysis. Whether you use the simple built-in Transform > Split, a versatile SPLIT() calculation, or manual string functions, you now have the tools to prepare your data for creating much more powerful and insightful dashboards.

All this manual data preparation, while powerful, shows how much time can be sunk into just getting data ready for analysis. We built Graphed because we wanted to go from questions to insights instantly, without all the intermediate steps. Simply connect your marketing and sales data sources, ask a question in plain English like, "create a dashboard showing ROAS for my Facebook campaigns last month," and we instantly build the live dashboard for you - no data formatting required.

Related Articles