Reader small image

You're reading from  Tableau Prep Cookbook

Product typeBook
Published inMar 2021
PublisherPackt
ISBN-139781800563766
Edition1st Edition
Tools
Right arrow
Author (1)
Hendrik Kleine
Hendrik Kleine
author image
Hendrik Kleine

Hendrik Kleine is an advanced analytics leader with 15 years of experience in the analytics space, including in data architecture, engineering, and visualization. He specializes in translating vast amounts of data into easy-to-understand visual communications that provide actionable intelligence. He is an avid innovator and a listed author of multiple data-related inventions. Before COVID-19, he was a speaker at the most recent Tableau conference in San Francisco.
Read more about Hendrik Kleine

Right arrow

Pivoting rows to columns

When preparing data that has been generated by transactional systems, you may encounter data structures that appear nonsensical from a reporting and analytics perspective. Take a sales order as an example. A sale may be for one or multiple items and the total sales amount may be affected by things such as a loyalty card, discount, referral code, and of course sales tax. Depending on which system you are working with, such information may be reported separately, that is, in columns. However, it's quite likely to see multiple rows in your dataset for the same transaction. In this recipe, we'll look at pivoting data from rows to columns, which will resolve any issues arising from such a data structure. Broadly, these steps are similar to pivoting columns to rows, with some important differences, as we'll see.

Getting ready

To follow along with this recipe, download the Sample Files 6.3 folder from this book's GitHub repository.

How...

lock icon
The rest of the page is locked
Previous PageNext Chapter
You have been reading a chapter from
Tableau Prep Cookbook
Published in: Mar 2021Publisher: PacktISBN-13: 9781800563766

Author (1)

author image
Hendrik Kleine

Hendrik Kleine is an advanced analytics leader with 15 years of experience in the analytics space, including in data architecture, engineering, and visualization. He specializes in translating vast amounts of data into easy-to-understand visual communications that provide actionable intelligence. He is an avid innovator and a listed author of multiple data-related inventions. Before COVID-19, he was a speaker at the most recent Tableau conference in San Francisco.
Read more about Hendrik Kleine