Data Prepping: Splitting Columns

Before diving into analysis, data needs to be understood and cleaned. One option for cleaning is splitting columns.

Why might we need to split columns? Well, sometimes a single column can contain multiple data types. This contradicts one of the rules of data structure – one data type for each data field (column).  If we have more than one data type in a column we cannot analyse the individual data types held within.

Let’s show an example of how to split columns in Tableau Prep. Here we have some bike sales data. The last column contains both store location and bike type. What if we want to analyse bike type and bike value? We need to split the store – bike column into two.

To do this we select the ellipsis in the store – bike column, select split values, then custom split.

We could select automatic however selecting custom allows for more control with where we split the column, and is more useful for more complicated splits.

So now that we have the custom split box we need to decide where we are splitting the column. As we want one column with store location data and one column with bike type we want to split in between them at the dash. To let Tableau Prep know we want to split at the dash we put '-' in the separator box.

Next we select the split off drop down menu and select all. We select all because we want two columns. If we only wanted store location we would keep 'first' as store location is the first 'section' on the side of the '-'.

And voila! Two separate fields, one with store location and one with bike type. Just rename the headers by double clicking the headers and get ready to analyse!

Author:
Miffy Allen
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab