Tableau Unpivot using Pivot Option

In Tableau, there is a pivot option to convert the table columns to unpivot data. However, this option works only with text, CSV, or Excel files. You have to write your own custom sql query for the database. In this Tableau article, we use the pivot option to perform unpivot table columns.

The below screenshot shows you the data inside a text file.

Text File

Drag and drop the CSV file to view data inside it. Please refer to connect to text file article to view the steps involved in the Tableau connection information.

Click the down arrow and choose field names are in the first row option.

Add Column Headers

Tableau Unpivot using Pivot Option

Select all the columns and click on the down arrow to see the options in the context menu. Please select the Pivot option. For database. input, please refer to Using Custom Query article.

Use Tableau Pivot Option to Unpivot the Columns

We got our data; however, we must rename the columns to meaningful ones. So, right-click on the column and select rename to write the custom name.

Rename the Column

Do the same for the remaining columns.

Change the Column Names

Let me design a simple chart to show you the data we got from Unpivot table columns.

Chart from Tableau Unpivot using Pivot Option

About Suresh

Suresh is the founder of TutorialGateway and a freelance software developer. He specialized in Designing and Developing Windows and Web applications. The experience he gained in Programming and BI integration, and reporting tools translates into this blog. You can find him on Facebook or Twitter.