Shape or transform a query (Power Query)

Note: Power Query is known as Get & Transform in Excel 2016. Information provided here applies to both. To learn more, see Get & Transform in Excel 2016.

Data shaping is a common task in Excel that involves reducing and rearranging one or more tables into a subject table that matches your data analysis requirements. Power Query provides an intuitive user interface to help you define data shaping and transformation steps with simple user actions over a set of data.

These steps are automatically run every time a query is refreshed, and can be modified later to match changes in the data or in your analysis needs. You can shape data from multiple data sources by adding, removing or editing query steps. Query steps replace the need to manually acquire and reshape data in Excel.

Power Query enables you to import data into Microsoft Excel from a wide variety of data sources including other Microsoft Excel Workbooks, SQL Server, Oracle, IBM DB2, SharePoint, and other structured data. For more information about connecting to a data source, see Connect to a data source.

Once you connect to a data source, you use the Query Editor to shape your data into a useful format. As you shape your data source, Power Query automatically creates a sequence of query steps associated with a specific editor activity. For example, a sequence of query steps is created while you work in the query editor to connect to a data source, promote a row to column headers, sort rows, and filter a table. For more information about how to shape data, see Shape data.

Note: For a quick video on how to display Query Editor, see the end of this article.

Example query steps

Query Editor activity

Query step

Connect to a data source


Expand a column containing a related table

Expand NewColumn

Rename a column


Sort a table


Expand table link

Note: The Query Editor only appears when you load, edit, or create a new query using Power Query. The following video shows the Query Editor window appearing after editing a query from an Excel workbook. To view the Query Editor without loading or editing an existing workbook query, from the Get External Data section in the Power Query ribbon tab, select From Other Sources > Blank Query. The following video shows one way to display the Query Editor.

How to see Query Editor in Excel

Need more help?

Expand your Office skills
Explore training
Got It
Get instant Excel help
Connect to an expert now
Subject to Got It terms and conditions

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.