Split and Pivot Your Data with Tableau Prep


Split and Pivot Your Data with Tableau Prep

With the release of Tableau Prep in April 2018, analysts have been given an incredibly valuable tool for their analytical kit. Considering both performance and ease of use, prepping your data before it enters Tableau Desktop has many benefits. I’ve created the following walkthrough to demonstrate just one of many data prep scenarios our clients have faced.

Tableau Prep in Practice

Business Goal: How many customers have selected a specific service type?

Data Goal: Rather than concatenating a customer’s selections in a single value (one row per customer), display all service type selections in a single column with one row per customer/service type combination (multiple rows per customer).

Why: This makes it easier to perform analytics on the Service Type field, such as answering questions like, “How many people selected Financial Literacy?”


Tableau Prep fields concatenated

Above: Service Types are concatenated in a single value per customer


Tableau Prep fields not concatenated

Above: Service Types are listed in one column with rows for each Service Type per customer


Step 1: Connect to data with an Input step.

Input step in Tableau Prep

Step 2: Split all values of the concatenated column into separate fields using a Clean step.

Clean step in Tableau Prep

Step 3: Remove the unnecessary, original concatenated column.

remove unnecessary fields in Tableau Prep

Step 4: Pivot the Split columns using a Pivot step.

removing the Split columns in Tableau Prep

Step 5: Remove the unnecessary Pivot Names field.

removing Pivot Names field in Tableau Prep

Step 6: Exclude blank values from your new pivoted column.

excluding blank values from pivoted column in Tableau Prep

Step 7: Preview results in a Clean step.

preview results in a Clean step in Tableau Prep

Step 8: Create an Output step.

creating an Output step in Tableau Prep

Step 9: Run the flow.

running the workflow in Tableau Prep

More About the Author

Katie Wagner

Analytics Consultant | Training Lead
Filter, Gruppen und Sätze in Tableau –Was macht wann Sinn? Tableau nutzt Filter, Gruppen und Sätze (Englisch: Filter, Groups & Sets), um Daten zu organisieren. Sie wurden jeweils für einen ...
Preppin’ Data Project: Week 1 Note: A big thank you to Carl Allchin and Jonathan Allenby for initiating the Preppin’ Data project for our community. Hunker down, ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK


Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072


Love our blog? You should see our emails. Sign up for our newsletter!