Pivot

Pivot consists of transforming columns into lines. In this example, we want to pivot the four columns with the different years into two columns: one for the name of the year and one for the value.

To do that, follow these steps:

  1. Select all the years' columns to pivot (click on them while pressing Ctrl (Windows) or command (macOS)).
  2. Right-click on the last selected one and select Pivot, as highlighted here:

The result of the pivot is two columns:

  • One Dimension: Pivot Field Names
  • One Measure: Pivot Field Values

You can rename them to Year and Values, respectively.

The transformations are complete. You have a clean and simple Data ...

Get Getting Started with Tableau 2018.x now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.