Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Note: This article has done its job, and will be retiring soon. To prevent "Page not found" woes, we're removing links we know about. If you've created links to this page, please remove them, and together we'll keep the web connected.

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

Source

Expand a column containing a related table

Expand NewColumn

Rename a column

RenamedColumns

Sort a table

SortedRows

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?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×