How to Split in Tableau Public

Cody Schneider••8 min read

Splitting a single column of data into multiple, more useful columns is a fundamental data prep task, but wrestling with complicated formulas can be a real headache. Tableau has a built-in function that makes parsing your text data incredibly straightforward. This article walks you through exactly how to use the Split and Custom Split features in Tableau to clean your data and set it up for better analysis.

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 Exactly is the Split Function in Tableau?

The split function in Tableau is a tool that breaks up string (text) data from one column into several new columns. It does this by identifying a "delimiter" - a specific character like a comma, space, or dash - that separates the different pieces of information within your original column.

For example, imagine you have a column named "Full Name" with entries like "Jane Doe." Using a space as the delimiter, Tableau's split function can automatically create two new columns: one for "First Name" (Jane) and another for "Last Name" (Doe).

Tableau offers two ways to do this:

  • Automatic Split: Tableau will analyze a column and take its best guess at the delimiter to use for the split. This is fast and works well for simple, consistent data.
  • Custom Split: You tell Tableau exactly which delimiter to use, how many new columns to create, and which parts of the original string to separate. This gives you much more control and precision.

Common Use Cases for Splitting Data

You’ll find yourself reaching for the split tool frequently. It's especially useful when your data source isn't perfectly formatted for analysis and you need to break down composite fields. Here are a few common scenarios where splitting comes in handy:

  • Parsing Names: Separating a single "Full Name" field into distinct "First Name," "Middle Name," and "Last Name" columns for more granular customer analysis.
  • Breaking Down Locations: Splitting a "City, State, Zip Code" field into three separate columns to analyze geographic data by city, state, or postal code.
  • Segmenting Product IDs or SKUs: If you have product SKUs like "TEE-BLUE-LARGE," you can split by the dash to get "Product Type," "Color," and "Size" columns for inventory and sales reporting.
  • Extracting Order Information: An "Order ID-Date" field (e.g., "12345-2024-10-26") can be split to isolate the order number from the date.
  • Analyzing URL Parameters: Extracting UTM parameters (like source, medium, and campaign) from a marketing URL to measure campaign performance.

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.

How to Use the Automatic Split in Tableau

The quickest way to split a column is by using the automatic feature. This is best for data that has a very clear and consistent delimiter. Let's walk through it using an example of a "Customer Name" column.

Step-by-Step Guide to Automatic Split

  1. Go to the Data Source Tab: Start by opening your Tableau workbook and navigating to the Data Source tab in the bottom-left corner. This is where you can see a preview of your raw data.
  2. Locate and Select Your Column: Find the column you want to split. For our example, this would be "Customer Name." Click on the column header to select it.
  3. Apply the Split: Click the small downward-facing arrow on the right side of the highlighted column's header. In the dropdown menu that appears, simply select Split.

Tableau will instantly do its best to identify the delimiter (in this case, a space) and create new columns. In the worksheet, you'll see new columns like "Customer Name - Split 1" and "Customer Name - Split 2," containing the first and last names, respectively. You can then rename these new columns to something more intuitive, like "First Name" and "Last Name."

How to Use the Custom Split for More Control

What if the automatic split doesn't work as expected? Maybe your data has multiple delimiters, or Tableau guesses the wrong one. This is where Custom Split becomes your best friend, giving you complete authority over the process.

Let's use an example of a "Product Info" column with data formatted as "SKU_Category_Subcategory" (e.g., "AB123_Apparel_Shirts").

Step-by-Step Guide to Custom Split

  1. Navigate to Your Data: You can perform a Custom Split from either the Grid view on the Data Source page or from the Data pane in a worksheet.
  2. Initiate the Custom Split: Find the dimension you want to split in the Data pane (e.g., "Product Info"). Right-click on it, hover over Transform in the context menu, and then select Custom Split...
  3. Configure the Split Options: A dialog box will pop up. Here’s how to configure it:
  • Use the separator: In this field, type the delimiter you want to use. For our example, we would enter an underscore character (_).
  • Split off: This setting tells Tableau which parts of the text to grab. You can choose:
  • Number of columns: When you select "First" or "Last," you'll specify how many splits to make. If you choose "All," this field disappears as Tableau will create as many columns as needed. For our "Product Info" example, we'd select "All."
  1. Click OK: Once you've set your options, click OK. Tableau will generate the new columns in your Data pane, named "[Original Field name] - Split N," ready to be dragged into your analysis. You can then rename them to "SKU," "Category," and "Subcategory."

For Advanced Users: Splitting Data with a Calculated Field

Sometimes you don't need a bunch of new columns cluttering up your Data pane. You might only need to extract one specific piece of information from a string for a single calculation or chart. In these cases, using the SPLIT() function inside a calculated field is the most efficient method.

The syntax for the function is:

SPLIT(string, delimiter, token_number)

Here's what each part means:

  • string: The field you want to split (e.g., [Employee Email]).
  • delimiter: The character used to separate the text (e.g., "@").
  • token_number: An integer that specifies which piece of the split string to return. For example, 1 returns the first piece, -1 returns the last piece.
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

Example 1: Extracting an Email Domain

Let's say you have a field called "Employee Email" containing addresses like "contact@business.com," and you want to analyze employees by their domain.

  1. Right-click in an empty space in the Data pane and select Create Calculated Field.
  2. Name the field Email Domain.
  3. Enter the following formula: SPLIT([Employee Email], '@', 2)
  4. Click OK. Now you have a new dimension that contains only the domain (e.g., "business.com") without creating an extra column for the username part.

Example 2: Getting a User's Last Name

If you have a "Full Name" field formatted as "First Last" (e.g., "Michael Scott") and need just the last name:

  1. Create a calculated field named Last Name.
  2. Enter this formula: SPLIT([Full Name], ' ', -1)
  3. The -1 as the token number is a neat trick that always grabs the very last part of the string, which is great for names with multiple middle names.

Practical Tips and Troubleshooting

While splitting data is usually smooth, you might run into a few common hurdles. Here’s how to handle them.

Problem: The Split options are grayed out.

Solution: The Split and Custom Split functions only work on string (text) data types. If your field is currently recognized as a number or date, the option will be unavailable. Go to your Data Source tab or the Data pane, click the icon next to your field name (# for numbers, a calendar for dates), and change the data type to String.

Problem: My data has leading or trailing spaces.

Solution: Sometimes a split results in data with unwanted blank spaces (e.g., " Product A" instead of "Product A"). You can fix this by wrapping a TRIM() function around your SPLIT() calculation. For example: TRIM(SPLIT([My Field], '-', 1)) will remove any spaces from the beginning or end.

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.

Problem: My data has inconsistent delimiters.

Solution: This one is tougher and usually requires data cleaning before bringing it into Tableau. For example, if some location data is formatted as "City, State" while others are "City-State," Tableau's split won't work consistently. Your best bet is to clean this up in the source file or use a data prep tool. For more advanced fixes within Tableau, you might need to combine split functions with REGEX calculations to handle more complex patterns.

Problem: A split returns NULL values.

Solution: This typically happens when you ask for a part of the string that doesn't exist. For instance, if you split "John Doe" by a space and ask for the 3rd token (SPLIT([Full Name], ' ', 3)), it will return a null because there is no third part. Double-check your token numbers in your calculated fields and the consistency of your data.

Final Thoughts

Getting your data into the right shape is the first step toward building meaningful visualizations, and mastering the split function is a huge leap in that direction. Whether you need a quick automatic split or a more precise custom split, Tableau gives you the tools to parse messy fields into clean, analyzable columns without touching a line of complex code.

As powerful as tools like Tableau are, their manual, click-based workflows can still be time-consuming. Instead of spending time cleaning and preparing columns before you can even start your analysis, we built Graphed to remove the friction. You can connect all your marketing and sales data sources in seconds, and then just ask for a report in plain English - "compare ad spend vs. revenue by campaign" - and our AI handles all the underlying data prep, creating real-time dashboards for you instantly.

Related Articles