How to Split Columns in Tableau
Splitting columns in Tableau is one of those simple tasks that can dramatically speed up your data preparation. Maybe you have a full name field you want to separate into first and last names, or campaign names with product codes and dates embedded in them. This guide will walk you through how to use Tableau's split features to get your data ready for analysis.
When Should You Split Columns in Tableau?
You’ll often find that your raw data isn't perfectly structured for the exact visualization you want to create. Splitting columns helps you break down a single data field into multiple, more useful ones. It's a fundamental part of the data cleanup process before you start building your dashboards.
Here are a few common scenarios where splitting a column is necessary:
- Full Names: Breaking a "Recipient Name" like "Jane Doe" into separate "First Name" and "Last Name" columns.
- Geographic Data: Separating a single "Location" field like "New York, USA" into "City" and "Country" columns.
- Order or Product IDs: You might have a product ID like "PROD-24601-XL" and need to isolate the product line, the specific number, and the size into their own fields.
- Date and Time: Separating an export that combines date and time into one column, like "2023-11-21 09:30:00", into distinct "Date" and "Time" fields.
- Campaign Tracking Codes: Extracting source, medium, and campaign name from a UT code like "google cpc search-brand-q4".
By splitting this data, you gain more granular control, allowing you to filter, sort, and group your visualizations more effectively.
Method 1: Using the Automatic Split Feature
Tableau's automatic split is the fastest way to get the job done. It analyzes the data in your selected column and intelligently identifies common separators (called delimiters) like spaces, commas, or hyphens. It's incredibly handy but works best when your data is structured consistently.
Free PDF Guide
AI for Data Analysis Crash Course
Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.
How to Use Automatic Split
Let's use an example. Imagine you have a dataset with a column named "Full Name" containing values like "John Smith", "Maria Garcia", and "Kenobi Obi-Wan". Here's how to split it:
Step 1: Locate the Column in the Data Source Tab
Open your Tableau workbook and go to the Data Source tab at the bottom left. Here, you'll see a preview of your data table. Find the column you want to split.
Step 2: Choose the Split Option
Click on the small down arrow that appears next to the column name ("Full Name"). This opens a context menu. From the menu, find and select Split.
Tableau will automatically try to find a common delimiter and split the column accordingly. In our example, it will use the space to separate the first and last names.
Step 3: Check the New Columns
Once you click "Split", Tableau will instantly create new calculated fields. In our name example, you'll see two new columns appear: "Full Name - Split 1" and "Full Name - Split 2".
That's it! Tableau has done the work for you. It's always a good idea to rename these new columns to something more descriptive, like "First Name" and "Last Name," by double-clicking the column header.
When Automatic Split Might Not Work
Sometimes, your data might have multiple delimiters or inconsistent patterns. For instance, if your data looked like "Doe, Jane" and "John Smith" in the same column, Tableau might get confused. This is where you need a more controlled approach, which brings us to the custom split.
Method 2: Using the Custom Split Feature
Custom Split gives you more control by letting you specify the exact delimiter you want to use. You can also tell Tableau which parts of the split data you want to keep.
Let's work with a column called "Order ID" with values like US-2023-A101, CA-2022-B202, and UK-2023-C303.
How to Use Custom Split
Step 1: Navigate to the Custom Split Option
Go to your Data Source tab, just as before. Click the dropdown arrow on the column you want to split ("Order ID"). This time, hover over Split, and from the sub-menu, select Custom Split.
Step 2: Define Your Split Parameters
A dialog box will pop up, asking you to define how the split should be performed.
Here’s what each option does:
- Use the separator: This is where you enter your delimiter. For our "Order ID" example, the delimiter is a hyphen (
-). You can type any character here – a comma, a forward-slash, a period, etc. - Split off: This section lets you choose which parts of the data to keep.
For our goal, we want to split the "Order ID" into three parts: country code, year, and ID. So, we'll enter - as the separator and select All columns. Click OK.
Step 3: Review and Rename Your New Columns
Tableau will generate three new columns: "Order ID - Split 1", "Order ID - Split 2", and "Order ID - Split 3". Rename them to "Country Code", "Year", and "ID Code" for clarity.
Method 3: Using SPLIT Functions in a Calculated Field
For the most power and flexibility, you can use calculated fields with the SPLIT function. This method is perfect when a physical split in the data source isn't ideal or if you need to use the split within a more complex calculation.
The syntax for the function is:
SPLIT(string, delimiter, token number)
- string: This is the field (or text) you want to split, like
[Order ID]. - delimiter: The special character that separates the parts of your string, such as
"-". - token number: An integer specifying which part of the string you want to return. For example,
1for the first part,2for the second, and so on.
Free PDF Guide
AI for Data Analysis Crash Course
Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.
How to Create a Calculated Field with a SPLIT Function
Step 1: Open the Calculated Field Editor
From any sheet, you can right-click in the Data pane on the left and select Create Calculated Field. Alternatively, you can use the dropdown menu at the top of the Data pane and choose the same option.
Step 2: Write the SPLIT Formula
Using our "Order ID" example (US-2023-A101), let's extract just the year. In the calculated field editor, you would:
- Name your calculated field something descriptive, like "Order Year".
- Enter the following formula:
SPLIT([Order ID], "-", 2)
This formula tells Tableau to look at the [Order ID] field, find the hyphens, and return the second component it finds. Click OK to save it. You will now have a new field called "Order Year" available in your data pane.
Why Might You Prefer This Method?
- It's clean: It creates only the exact field you need without adding multiple extra columns to your data source.
- It's dynamic: Calculated fields always compute based on the most current data, which is useful in live connections.
- It can be nested: You can combine
SPLITwith other functions for more advanced data transformations. For example, you could wrap it in anINT()function (INT(SPLIT(...))) to convert the resulting year-as-text into a number.
Final Thoughts
Splitting columns is a straightforward but powerful technique for cleaning and structuring your data in Tableau. For straightforward splits with consistent delimiters, the automatic split is your best friend. For more control, custom splits and calculated fields using the SPLIT() function give you the precision needed for complex or messy data.
Once you get used to these options, you'll find preparing your data becomes much faster, removing the manual work of exporting to a spreadsheet and then re-importing. If you're looking for an even easier way to work with your data, we've designed Graphed to bypass this entire process. You simply connect your sources like Shopify or Google Analytics and describe the chart you want in plain English, our tool handles all the data mapping, cleaning, and chart creation for you in seconds without requiring technical expertise or manual formula writing.
Related Articles
Facebook Ads for Dentists: The Complete 2026 Strategy Guide
Learn how to run Facebook ads for dentists in 2026. Discover proven strategies, targeting tips, and ROI benchmarks to attract more patients to your dental practice.
Facebook Ads for Gyms: The Complete 2026 Strategy Guide
Master Facebook advertising for your gym in 2026. Learn the proven 6-section framework, targeting strategies, and ad formats that drive memberships.
Facebook Ads for Home Cleaners: The Complete 2026 Strategy Guide
Learn how to run Facebook ads for home cleaners in 2026. Discover the best ad formats, targeting strategies, and budgeting tips to generate more leads.