KNOWLEDGE BASE

How to Transpose (Rotate) Data from Rows to Columns or vice Versa in Tableau Prep


Published: 20 Apr 2022
Last Modified Date: 21 Apr 2022

Question

How to transpose data from rows to columns in Tableau Prep Builder.

For example, the original data is like below.

No   Category    Value
1       A                   0
2       A                  10
3       B                  100
4       C                  1000

How to transpose the data from rows to columns.

No              1    2       3        4
Category    A    A       B        C
Value          0    10    100    1000

Environment

  • Tableau Prep Builder

Answer

The ability to transpose (Rotate) data from rows to columns, is not currently built into Tableau Desktop.

Please consider using the workaround below.
transpose data in two Pivot steps: Columns to Rows and then Rows to Columns

1. Pivot data from Columns to Rows.
User-added image

2. Pivot Data from Rows to Columns.
User-added image

3. Check the result in the cleaning step and change the filed names if necessary.
User-added image

Please also check the attached flow file and video for details.

 
Did this article resolve the issue?