Learn how to unpivot static tables in Excel 2016
With the new Get & Transform capabilities in Excel 2016, you can now import, transform and combine data from different sources—thanks to the integrated Power Query technology in Excel. Today we are going to focus on one of the most useful capabilities that Get & Transform offers—the ability to unpivot to transform ANY table in your workbook to make it ready for powerful analysis using PivotTables and PivotCharts.
Transform a static table into a PivotTable ready for deep analysis.
Let’s start with a common scenario. You have an Excel workbook that is dedicated for manual data entry to record the hours you put in for each relevant project:
But analyzing this data is not easy and sometimes you wish you could easily create charts on this data, or even better—PivotCharts.
Here is a common, yet challenging scenario—challenging, because it would take a lot of effort to get to the point you can gain insights from this data in the current format. Fortunately, through the new Get & Transform section in the Data tab of Excel 2016, the challenge is over.
Simply select any cell inside an existing table or range and in the Get & Transform section, click From Table.
You will see a preview of your data inside the Query Editor window. From this window, you can start transforming your data in powerful, yet simple ways. Each change you make is recorded as a transformation step that is saved with your workbook. All the steps are kept as a sequence that can be performed again and again each time you refresh your data.
In the Query Editor, you will usually need the help of the Unpivot transformation to change your table into a format that can be used by PivotTable.
In the example below, I can select the first column that includes project names and click Unpivot Other Columns to transform my data from columns of Project Name / 2010 / 2011 / 2012… to the desired column structure of Project / Year / Duration.
And here are the results in the Query Editor:
I can now rename the columns to Project, Year and Duration inside the Query Editor and then load the data into a PivotTable or PivotChart.
If you are familiar with the Unpivot functionality and want to test your skills, read this post. Even simple tables such as a class schedule may require some cunning approach.
The most common scenario includes nested tables with hierarchical date information such as years, quarters and months. Read here how to transform these tables.
And if you wish to apply your magic on ANY nested table, read this post that will first show you how to unpivot three levels of nested rows and columns. It is so simple.
On many occasions your data contains comma-separated values, like a table of events in which all participants are listed on a single column. You can learn here how to split such data and unpivot it.
Finally, you can learn here how to transform and unpivot all these challenging tables in Power BI Desktop, and build amazing dashboards in Power BI.
Try Office 365 to get the new Office 2016 apps!
December 29, 2015
Tina Rountree Player of the Month (December 2015)
Congratulations to Tina Rountree, Business Development Manager, for being selected […]LEARN MORE
December 30, 2015
Future Visions: Original Science Fiction Stories Inspired by Microsoft is an anthology of short stories written by some of today’s greatest science fiction authors. Explore prediction science, quantum computing, real-time translation, machine learning, and much more. FREE to download - learn more.
The greatest science fiction relies on talented writers to leverage […]LEARN MORE