Tableau Course
Splitting Fields in Tableau
Splitting breaks a single text field — like "John Smith" or "East-US-2024" — into separate, usable columns without touching the source data or writing a single formula by hand.
Why You Need to Split Fields
Source data is often packed together in ways that make analysis difficult. A Full Name column containing "Sarah Johnson" cannot be sorted by last name unless you separate it. A Product Code column containing "FURN-CH-10001" cannot be filtered by product line unless you extract the "FURN" prefix. A Location column containing "Austin, TX" cannot be used as a geographic field unless the city and state are in separate fields.
Tableau offers two split methods. Automatic Split detects the separator and creates the split with one click. Custom Split lets you specify the separator, the direction, and exactly how many fields to produce.
Automatic Split
Automatic Split works when your field has a consistent, recognisable separator — a comma, a hyphen, a space, a slash, or a pipe character. Tableau inspects the field values, detects the pattern, and splits on it immediately.
Automatic Split — Result Mockup
| Product Code |
|---|
| FURN-CH-10001 |
| TECH-PH-20035 |
| OFF-PA-10002 |
| FURN-BO-10003 |
| Product Line Split 1 |
Sub-Cat Code Split 2 |
Item Number Split 3 |
|---|---|---|
| FURN | CH | 10001 |
| TECH | PH | 20035 |
| OFF | PA | 10002 |
| FURN | BO | 10003 |
Custom Split
Custom Split gives you full control: you choose the separator, specify whether to split from the beginning or the end of the value, and set how many fields to produce. This is the right choice when Automatic Split produces too many fields, splits in the wrong direction, or guesses the wrong separator.
Custom Split Dialog — Mockup
Split vs SPLIT() Calculated Field
Behind the scenes, both the Automatic and Custom split tools generate a calculated field using Tableau's SPLIT() function. You can write this formula yourself in a calculated field if you need more precise control than the dialog provides.
| Formula | Input value | Result |
|---|---|---|
| SPLIT([Product Code], "-", 1) | FURN-CH-10001 | FURN |
| SPLIT([Product Code], "-", 2) | FURN-CH-10001 | CH |
| SPLIT([Location], ", ", 1) | Austin, TX | Austin |
| SPLIT([Location], ", ", 2) | Austin, TX | TX |
The third argument in SPLIT() is the token number — 1 for the first segment, 2 for the second, and so on. A negative number counts from the right: SPLIT([field], "-", -1) returns the last segment.
Common Situations Where Splits Are Used
Split fields are calculated fields — they do not modify the source data. This means they are applied at the Tableau layer and will re-execute every time the view queries the data. For small datasets this is imperceptible. For large live connections, creating many split calculated fields can slow down query performance. In those cases the right approach is to split the field once in Tableau Prep or in the source database and store the result as a proper column. Use Tableau's split tool for quick fixes and prototyping — when the workbook goes to production with large data, move the split logic upstream.
Practice Questions
1. Where in the right-click menu do you find Tableau's Automatic Split option when right-clicking a field in the Data pane?
2. What is the general structure of the SPLIT() calculated field formula Tableau uses behind the scenes when you apply a split?
3. After applying a split, what happens to the original field in the Data pane?
Quiz
1. Automatic Split produces more fields than you need and splits in the wrong direction. Which tool should you use instead?
2. The formula SPLIT([Product Code], "-", 1) is applied to the value "FURN-CH-10001". What does it return?
3. A workbook uses several split calculated fields and query performance is slow on a large live database connection. What is the recommended fix?
Next up — Lesson 17: Renaming fields and aliases — giving your data clean, readable labels without modifying the source.