Tableau Lesson 16 – Splitting Fields | Dataplexa
Section II — Lesson 16

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.

1
In the Data pane, right-click the field you want to split — for example, Product Code which contains values like "FURN-CH-10001".
2
Select Transform → Split. Tableau scans the values, detects the hyphen as the separator, and automatically creates new calculated fields: Product Code — Split 1, Product Code — Split 2, and Product Code — Split 3.
3
The new fields appear in the Data pane as calculated fields. Double-click each one to rename it — Product Line, Sub-Category Code, Item Number. The orignal field stays intact.

Automatic Split — Result Mockup

Data Pane — Before and After Automatic Split
Original field values
Product Code
FURN-CH-10001
TECH-PH-20035
OFF-PA-10002
FURN-BO-10003
After split — three new calculated fields
Product Line
Split 1
Sub-Cat Code
Split 2
Item Number
Split 3
FURNCH10001
TECHPH20035
OFFPA10002
FURNBO10003

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.

1
Right-click the field in the Data pane and select Transform → Custom Split. A dialog box opens with three settings.
2
Use the separator: type the character to split on — a comma, space, pipe, or any custom string. Split off: choose First (from the left) or Last (from the right). Number of new fields: set how many split columns to produce.
3
Click OK. Tableau creates the specified number of calculated fields. Rename each one in the Data pane to reflect its contents.

Custom Split Dialog — Mockup

Custom Split — Location Field
Field: Location — sample values: "Austin, TX" · "Seattle, WA" · "Miami, FL"
Use the separator
comma + space
Split off
First
Last
Number of new fields
→ produces "City" only
Cancel
OK

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

"First Last" names — split on space to get First Name and Last Name as separate fields for personalised reporting or alphabetical sorting by surname.
"City, State" locations — split on ", " to separate city from state, enabling geocoding and geographic visualisation on a map.
Product or order codes — split on hyphen to extract category prefix, sub-category, or item ID for filtering and grouping in product analysis.
Date strings stored as text — split on "/" or "-" to extract year, month, and day when the date field was not imported with the correct data type.
📌 Teacher's Note

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.