How to Split a Field in Tableau
Splitting a single column of data into multiple columns is a fundamental step in data preparation, and thankfully, Tableau makes this process straightforward. Whether you need to separate a full name into "first" and "last" or break down a product ID into its component parts, you can do it directly within the tool. This guide will walk you through the simple and advanced methods for splitting fields in Tableau.
Why Would You Need to Split a Field?
Before jumping into the “how,” it’s helpful to understand the “why.” Data rarely comes in a perfectly structured format ready for analysis. Often, multiple pieces of information are condensed into a single field. Splitting allows you to isolate these individual pieces so you can analyze, group, or filter by them.
Here are a few common scenarios where splitting fields is essential:
- Full Names: A column containing "Jane Doe" needs to be split into a "First Name" column ("Jane") and a "Last Name" column ("Doe").
- Geographic Data: A field like "Los Angeles, CA, 90001" can be split into "City," "State," and "Zip Code" for mapping and regional analysis.
- Order or Product IDs: You might have an ID like "US-TECH-2024-11894" that you want to split by the hyphen to analyze by country, product category, or year.
- Email Addresses: Splitting an email address like "contact@company.com" lets you analyze domains by separating the username from the domain name.
- Date and Time Stamps: A combined timestamp ("2024-05-15 10:30:00") can be split into separate "Date" and "Time" fields for easier analysis over time.
By breaking down these composite fields, you unlock more granular insights and gain greater flexibility in your visualizations.
Method 1: The Quick and Easy Automatic Split
Tableau is smart enough to recognize common separators (delimiters) like spaces, commas, hyphens, and underscores. For most standard cases, its built-in Automatic Split feature works perfectly and takes just a few clicks.
Let's use a "Full Name" field as our example.
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.
Step-by-Step Instructions:
- Go to the Data Source Pane: After connecting to your data, stay on the "Data Source" tab at the bottom left of your Tableau window. This is where you can view your data in a tabular format before building worksheets.
- Locate Your Field: Find the column header for the field you want to split. In our case, it’s "Full Name."
- Initiate the Split: Click the small downward arrow on the top right of the column header (or simply right-click the header). Navigate down the context menu to Transform > Split.
- Review the Results: Tableau will instantly analyze the field, identify the common delimiter (a space in "Jane Doe"), and create new fields. You’ll see two new columns appear: "Full Name - Split 1" (containing "Jane") and "Full Name - Split 2" (containing "Doe").
- Rename Your New Fields: To keep your data source organized, it's a best practice to rename these new fields. Click the arrow on the new columns and select "Rename." Change "Full Name - Split 1" to "First Name" and "Full Name - Split 2" to "Last Name."
That’s it! The automatic split is perfect for clean, consistently formatted data with common delimiters.
Method 2: Gaining More Control with Custom Split
Sometimes, the automatic split doesn't give you exactly what you need. Maybe your data uses an unusual delimiter, like a vertical pipe (|) or a tilde (~), or perhaps you only want to split off a specific part of the field. This is where the Custom Split comes in handy.
Imagine you have a product SKU formatted as Category-SubCategory-ProductID, for example, OFF-SUP-10002927.
Step-by-Step Instructions:
- Go to the Data Source Pane: Just like with the automatic split, begin in the "Data Source" tab.
- Select "Custom Split": Right-click the header of your "Product SKU" column, navigate to Transform, and this time, select Custom Split...
- Configure the Split: A dialog box will appear, giving you more control.
- Execute and Rename: Let's choose "All." Click "OK." Tableau will create three new columns: "Product SKU - Split 1," "Product SKU - Split 2," and "Product SKU - Split 3." You can then rename them to "Category," "Sub-Category," and "ProductID," respectively.
Custom Split is your go-to when you know the exact separator and want to be precise about which parts of the string you extract.
Method 3: Maximum Flexibility with Calculated Fields
For the most complex scenarios, such as when delimiters are inconsistent or you need to extract data based on its position, neither of the built-in split tools may suffice. In these cases, you can turn to Tableau’s powerful calculated fields and string functions.
The primary function you'll use is SPLIT().
Understanding the SPLIT() Function
The syntax for the function is:
SPLIT(string, delimiter, token number)- string: The field you want to split (e.g.,
[Email Address]). - delimiter: The character that separates the segments (e.g.,
"@","-"). The delimiter must be in quotes. - token number: The number of the segment you want to return. For example, in "contact@company.com",
1would return "contact," and2would return "company.com".
Unlike the transform tools, using the SPLIT() function in a calculation allows you to perform splits within a Worksheet, not just in the Data Source pane.
Example: Extracting a Domain Name from an Email
Let's say we have a field called [Customer Email] and we want to isolate the full domain part (everything after the "@").
- Create a Calculated Field: From any worksheet, right-click in the Data pane on the left and select "Create Calculated Field."
- Name Your Calculation: Give it a descriptive name, like "Email Domain."
- Enter the Formula: Type the following formula into the calculation editor.
SPLIT([Customer Email], "@", 2)
- Click OK: A new field named "Email Domain" will appear in your Data pane, which you can now use in your visualizations.
What if you wanted to strip the ".com" as well? You can nest SPLIT() functions:
SPLIT(SPLIT([Customer Email], "@", 2), ".", 1)
This formula first splits the email by "@" and takes the second part ("company.com"), then it takes that result and splits it by "." to return the first part ("company"). This level of creativity is what makes calculated fields so powerful for advanced data manipulation.
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.
Other Useful String Functions
Beyond SPLIT(), functions like LEFT(), RIGHT(), MID(), and FIND() are also incredibly useful for parsing strings:
- LEFT(string, number): Returns the specified number of characters from the start of the string.
- RIGHT(string, number): Returns the specified number of characters from the end of the string.
- FIND(string, substring): Returns the starting position of a substring. This is often used to find the location of a delimiter to use with
LEFTorRIGHT.
For instance, to get the username from an email, you could use this formula to find the position of the @ symbol and grab everything to the left of it:
LEFT([Customer Email], FIND([Customer Email], "@") - 1)
Final Thoughts
Splitting fields is a non-negotiable skill for anyone serious about doing data analysis in Tableau. Whether you use the simple one-click automatic split for easy cases, the custom split for more specific needs, or calculated fields for complex logic, Tableau provides the right tool for the job. Mastering these techniques will save you countless hours cleaning your data and enable much deeper, more precise insights.
Of course, prepping data is just the beginning. Often, the real bottleneck is turning that clean data into dashboards and answers. If you’ve ever found yourself spending more time wrestling with dashboard builders than analyzing results, you'll love how Graphed simplifies the whole process. We let you connect your data sources in seconds and then use natural language to build dashboards and ask questions. Instead of clicking, dragging, and formatting, you just ask, “Show me my revenue by product category from Shopify as a bar chart,” and the report is built for you instantly.
Related Articles
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.
Facebook Ads for Pet Grooming: The Complete 2026 Strategy Guide
Learn how to run Facebook ads for pet grooming businesses in 2025. Discover AI-powered creative scaling, pain point discovery strategies, and the new customer offer that works.
AI Marketing Apps: The 15 Best Tools to Scale Your Marketing in 2026
Discover the 15 best AI marketing apps in 2026, from content creation to workflow automation, organized by category with pricing and use cases.