Split and Pivot Your Data with Tableau Prep

Data

Split and Pivot Your Data with Tableau Prep

by Katie Wagner

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?”

Original

Tableau Prep fields concatenated

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

Goal 

Tableau Prep fields not concatenated

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

How: 

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
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, ...
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. ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

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
Germany
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