Splitting fields with multiple values
It's not uncommon for a single field to contain multiple values. For example, a name field may contain both a user's first and last name. Separating these can be done with Tableau Prep's Split Values function. Split Values facilitates the automatic creation of calculated fields with the necessary logic to split up a field based on your requirements.
Getting ready
To follow along with this recipe, download the Sample Files 3.6 folder from this book's GitHub repository.
How to do it…
Open up Tableau Prep and connect to the December 2016 Sales.xlsx file from the Sample Files 3.6 folder and follow the steps:
- Click the + icon on the input step and select Clean Step to add a cleaning step to your flow.
In the profile pane, we can see that the field named Cashier contains an employee's name. We want to split that value into two separate fields, first name and last name: