Pivoting in Tableau Prep - Part A

Photo by Kelly Sikkema / Unsplash

We learned about pivoting in our first week. Essentially, pivoting is a data transformation technique used in databases and spreadsheets to reorganize and reshape data by changing the layout of the data from one form to another. It involves rotating the data between rows and columns to provide a different perspective on the information.

But when do we need to use pivoting? Let's explore some situations:

Pivoting from Columns to Rows

When we pivot data from column to row, we are essentially taking distinct values from a column and transforming them into separate rows. Each value becomes a new row in the resulting table.

Consider a table that contains information about employees' attendance for different months. We might want to pivot this data to have separate rows for each month's attendance for every employee.

0:00
/

In this example, we have transformed the data from columns to rows, providing a more detailed view of each employee's attendance per month.

In the next post, we will walk through an example of pivoting from rows to columns.

Author:
Abby Poon
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab