How to Custom Split in Tableau

Cody Schneider8 min read

Ever find yourself staring at a single column in your data that's packed with too much information? Maybe it's a "Full Name" field when you need separate columns for first and last names, or a campaign ID string you need to break apart. This article will show you how to use Tableau's powerful but simple Custom Split feature to quickly parse your text fields and clean up your data without ever leaving the application.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

What is Custom Split and Why Should You Use It?

Think of Tableau's Custom Split as a smarter, more controlled version of the "Text to Columns" function in Excel or Google Sheets. It lets you take a single dimension (a text field) and break it into multiple new dimensions based on a specific character, called a delimiter. This is a fundamental skill for anyone doing data preparation directly within Tableau.

While the standard "Split" option in Tableau makes a helpful guess, Custom Split gives you complete control over the process, allowing you to specify exactly how the data should be separated. It's an essential tool for turning messy, combined fields into clean, usable dimensions for your visualizations.

Common Scenarios for Using Custom Split

You’ll find yourself reaching for Custom Split more often than you think. Here are a few popular use cases:

  • Separating Full Names: Splitting "John D. Smith" into three new columns: "John," "D.," and "Smith."
  • Breaking Down Campaign IDs: Parsing a code like "Fall2023-Facebook-Ad1" to get the season, source, and ad version.
  • Extracting Information from URLs: Pulling out specific parts of a URL path, like /products/shoes/running to analyze categories and subcategories.
  • Parsing Location Data: Separating "Brooklyn, NY" into "Brooklyn" and "NY."
  • Deconstructing Product SKUs: Breaking down SHIRT-BLUE-M-129 into columns for product type, color, size, and model number.

How to Use Custom Split in Tableau: A Step-by-Step Guide

Let's walk through the process with a common marketing example. Imagine you have a field called Campaign Details with data formatted like this: Source-Medium-CampaignName. For instance, a row might look like Google-CPC-HolidayPromo.

Your goal is to create three new fields: Source, Medium, and Campaign Name.

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 1: Locate Your Field and Open the Custom Split Menu

First, find the field you want to split in the Data pane on the left-hand side of your Tableau worksheet. Right-click on the field to bring up the context menu.

From the menu, navigate to Transform > Custom Split...

Step 2: Define Your Delimiter

A new window will pop up. This is where you tell Tableau how to split your text. In the "Use the separator" field, type the character that separates the pieces of your data. In the Google-CPC-HolidayPromo example, the delimiter is a hyphen (-).

Tableau recognizes common delimiters like commas, spaces, and periods, but you can use any character, including less common ones like a pipe (|) or underscore (_).

Step 3: Choose Your "Split Off" Option

This is where the "custom" part really comes into play. You have three powerful options to choose from: First, Last, and All.

  • First: This option grabs only the text before the first instance of your delimiter. You can specify how many "columns" or segments you want to create from the beginning of the string. Example: Splitting Google-CPC-HolidayPromo on the First 1 occurrence of - would create one new field: "Google."
  • Last: This works from the end of the string backward. It grabs only the text after the very last instance of your delimiter. Example: Splitting Google-CPC-HolidayPromo on the Last 1 occurrence of - would create one new field: "HolidayPromo."
  • All: This option splits the field at every single instance of the delimiter, creating a new field for each part. For our example, choosing "All" will break Google-CPC-HolidayPromo into three new fields.

Since we want all three parts of our string, we will select All.

Step 4: Execute the Split and Rename Your Fields

Click "OK." Tableau will automatically perform the split and add the new fields to your Data pane. They will have default names based on the original field, like:

  • Campaign Details - Split 1
  • Campaign Details - Split 2
  • Campaign Details - Split 3

Right-click each new field and select Rename to give them more meaningful names, such as "Source," "Medium," and "Campaign Name." Now you have three clean, usable dimensions to build your reports!

Advanced Examples in Practice

The real power of Custom Split is its flexibility. Let's look at more nuanced examples to see how the "First" and "Last" options can be incredibly useful.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Example 1: Parsing Product Codes

Imagine an e-commerce dataset with a Product SKU field formatted as Category-ProductID-Color. Let's say you have a value like APPAREL-10521-BLUE.

  • To get only the Category: Right-click Product SKU, select Custom Split, use - as the delimiter, and choose "Split off: First - 1 columns". This creates a new field with just "APPAREL".
  • To get only the Color: Use the same process, but select "Split off: Last - 1 columns". This creates a field containing only "BLUE".

These single-click actions are much faster than writing complex logical formulas to achieve the same result.

Example 2: Cleaning User Entry with Inconsistent Segments

What if your data isn't perfectly consistent? Consider a User Provided Location field where users entered their city, state, and sometimes a neighborhood or extra details. The data might look like this:

  • Boston, MA
  • Brooklyn, New York, USA
  • San Francisco, CA, Mission District

Your goal is to extract just a "City" field. You can't rely on splitting "All" because the number of segments varies. But you can rely on the fact that the city is always the first part.

To solve this, use Custom Split with a comma (,) as the delimiter and select "Split off: First - 1 columns". This will reliably pull "Boston," "Brooklyn," and "San Francisco" into a new, clean City dimension.

Custom Split vs. Regular Split: What's the Difference?

You may have noticed another "Split" option in the right-click menu. So when should you use that instead of Custom Split?

  • Regular Split: This is a fully automatic option. Tableau scans the field, guesses the most likely delimiter (like a comma, space, or hyphen), and performs an "All" split based on that guess. It's fantastic for quick-and-dirty data cleaning when your delimiters are obvious and you need all parts of the string. For City, State data, a regular Split works perfectly.
  • Custom Split: This is for when the automatic option fails or when you need explicit control. You get to choose the delimiter, overcome ambiguous characters (does Product A - Small split on the space or the hyphen?), and specify whether you only want the beginning or end of the string. It is the more robust and precise tool.

Rule of thumb: Always try the regular Split first. If it doesn't give you what you want, immediately pivot to Custom Split for more control.

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.

When You Need to Go Beyond Custom Split

Custom Split is an amazing time-saver, but it's designed for data that follows a consistent pattern and has a clear delimiter. What do you do when the pattern gets more complex or you need to process text in ways a simple split can't handle? That's when you turn to Calculated Fields.

Tableau offers string functions like SPLIT, FIND, LEFT, and RIGHT that allow you to write formulas for more advanced text parsing. For example, the SPLIT() function does the same exact thing as Custom Split but inside a calculation.

The code to extract just the state from a "City, State" field would look like this:

// Takes the 'City_State' field, uses a comma and space as the separator,
// and pulls out the second part.
SPLIT([City_State], ', ', 2)

If you find yourself needing to handle scenarios where the delimiter sometimes exists and sometimes doesn't, or you have to find and extract text based on its position, calculated fields are your next logical step. But for a huge number of everyday data cleaning tasks, Custom Split is the fastest and easiest way to get the job done.

Final Thoughts

Mastering Tableau's Custom Split equips you with a powerful tool to quickly prepare your data for analysis. It streamlines the often-tedious process of breaking down messy text fields, allowing you to create the clean dimensions you need to build meaningful visualizations and reports, all without bugging your dev team to fix the underlying data source.

While tools like Custom Split are great for cleaning and prepping your data, that's still just one step in the long process of building a report. After connecting and cleaning your data, you still have to manually build every dashboard to answer your team's questions. Here at Graphed, we've automated this entire process. We allow you to connect all your marketing and sales data sources in one click and then use simple, natural language to instantly build real-time dashboards and reports. Instead of using a manual splitter, and then building the charts by hand, you can just ask, "Show me revenue by campaign from my Facebook Ads" and get a live, interactive dashboard in seconds. Try it for free with Graphed today.

Related Articles