How to Unpivot (Transpose) Data in Tableau Prep

Tableau Prep is a great tool for dealing with messy or unorganized data. After understanding the basics, one of the first things I found myself wondering was “does Tableau Prep have the ability to unpivot data?”. It has a pivot feature but does not have an unpivot or transpose feature at this point. However, there is a workaround.

Imagine you have a dataset that looks like this:


The first step (after connecting to the data) will be to add a clean step and create a calculated field for each measure:


When this is done, there are going to be some large null sections for each measure. That is okay. We’ll deal with that momentarily:


You can now remove the Measure and Values fields.

From there we can add the created measures to “Aggregated Fields” and the other dimensions to “Grouped Fields”:


From there the data can be exported and is unpivoted:



Want to learn more about Tableau Prep? Join our webinar Using Tableau Prep on Dirty Data May 16th at 9:00 am PDT.

Want to master the product? Sign up for our workshop Tableau Prep Foundations May 22nd-24th while there's still space!