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.

Learn how to unpivot static tables in Excel 2016 1

Learn how to unpivot static tables in Excel 2016 2

Learn how to unpivot static tables in Excel 2016 3

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:

Chart

But analyzing this data is not easy and sometimes you wish you could easily create charts on this data, or even better—PivotCharts.

Learn how to unpivot static tables in Excel 2016 4

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.

Learn how to unpivot static tables in Excel 2016 5

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.

Learn how to unpivot static tables in Excel 2016 6

And here are the results in the Query Editor:

Learn how to unpivot static tables in Excel 2016 7

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.

Learn more

We recently published a series of blog posts on our TechNet blog, beginning with Get & Transform Data in Excel 2016, that walk you through a variety of scenarios and magical transformations that can take ANY kind of a table or range in Excel and unpivot it into the desired structure for PivotTables and PivotCharts.

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.

Learn how to unpivot static tables in Excel 2016 8

The most common scenario includes nested tables with hierarchical date information such as years, quarters and months. Read here how to transform these tables.

Learn how to unpivot static tables in Excel 2016 1

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.

Learn how to unpivot static tables in Excel 2016 9

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.

Learn how to unpivot static tables in Excel 2016 - comma-separated values

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.

Learn how to unpivot static tables in Excel 2016 10

I also invite you to learn more about integrating Power Query technology in Excel 2016 and Get & Transform in Excel 2016.

—Gil Raviv, senior program manager for the Excel team