Pivoting data - its all about the record

Pivoting data is the process of reshaping unorganised data into something that can be easily analysed. A messy dataset may have multiple counts of the same record with different measure. Ideally, we want each record to be unique and display measures of each of the specified field.

In the example below, we see that all three patients have four records each identifying a different measure. We want one record for each patient and have every measure listed in its correct field.

Once we have pivoted the data, we now have a more organised and condensed dataset that we can analyse.

Tableau Prep Builder allows you to easily pivot data and choose the specific field we want to base the dataset around. In this example, our records are based on the patient number, but in a larger dataset, we could have specified the blood types, wards or even admission date.

Author:
Muhammad Choudhury
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
© 2024 The Information Lab