Power Query in Excel desktop lets you connect to data sources, clean and reshape data, and load the result into a worksheet or the Data Model — all without writing formulas or macros. It is built into Excel for Windows and Mac (though the Mac version has some limitations). To follow this guide, you need Excel desktop installed and a data source such as a CSV file, an Excel workbook, or a database. The exact button labels can differ slightly by Excel version, but the overall workflow is the same.

What You'll Need

  • Excel desktop (Microsoft 365 or Excel 2016 or later). The steps below focus on Windows; Mac users will find most features in the Data tab, but some connectors and the full Power Query Editor may not be available.
  • A data source you can access — for example, a CSV file on your computer, a table in another workbook, or a database you have credentials for.
  • Basic familiarity with rows and columns; no coding required.

Step-by-Step

  1. Open the Data tab. In Excel, go to the Data tab on the ribbon. The Get & Transform Data group contains the Power Query commands. On Mac, look for the Get Data button in the Data tab; the layout may be slightly different.
  2. Choose your data source. Click Get Data (or Get & Transform Data > Get Data). From the menu, select the type of source — for example, From File > From Text/CSV for a CSV file, or From File > From Workbook for another Excel file. For databases, choose From Database and pick your database type.
  3. Locate and select the file. Browse to the file, select it, and click Open. If prompted, provide any credentials or connection information. For a CSV, Excel shows a preview dialog where you can set the delimiter and encoding; check that the preview looks correct, then click Load to bring the data directly into a worksheet, or click Transform Data to open the Power Query Editor for cleaning.
  4. Use the Power Query Editor to clean and shape. The editor opens in a separate window. The left pane lists queries; the center shows a preview of your data; the right pane (Applied Steps) records each change you make. Common actions:
    • Right-click a column header to rename, remove, or change its type.
    • Use the Home tab > Remove Rows to delete top rows, blank rows, or duplicates.
    • Use Transform tab > Use First Row as Headers if your column names are in the first data row.
    • Use Add Column > Custom Column to create new columns with simple formulas (M code).
    • Use Home > Close & Load when finished; choose Close & Load To... to load to a worksheet, the Data Model, or only create a connection.
  5. Load the query. After cleaning, click Home > Close & Load to load the result into a new worksheet as a table, or Close & Load To... to choose a destination. Loading to the Data Model is useful if you plan to use Power Pivot or build relationships.
  6. Refresh the query. When the source data changes, go to the Data tab > Refresh All (or right-click the query in the Queries & Connections pane and choose Refresh). Power Query re-runs the applied steps and updates the output.

Common Mistakes

  • Forgetting to set data types. Power Query often guesses types, but wrong types (e.g., text instead of numbers) cause errors later. Always check the type icon in the column header and change it if needed.
  • Editing the output table manually. If you type over the loaded table, those changes are lost on refresh. Do all cleaning in the Power Query Editor, not in the worksheet.
  • Not using the right delimiter for CSV files. If columns appear merged, re-open the query and set the correct delimiter in the preview dialog or in the Transform tab > Use First Row as Headers and Split Column.
  • Loading to the wrong place. Loading to a worksheet when you meant to load to the Data Model (or vice versa) can be fixed by editing the query properties: right-click the query in the Queries & Connections pane and choose Load To....
  • Ignoring errors. Power Query shows errors as Error cells. Click the cell to see the error message, then fix the step that caused it (often a type conversion or a missing column).

Tips

  • Name your steps. In the Applied Steps pane, double-click a step to rename it. Clear names make complex queries easier to debug.
  • Use the Advanced Editor sparingly. It shows the M code behind your steps. You can edit it, but a mistake can break the query. Stick to the ribbon buttons unless you are comfortable with M.
  • Keep a copy of the source file. Power Query does not modify the original file; it reads from it. If the file moves or is renamed, the query breaks and you will need to update the source path.
  • Combine queries. Use Home > Combine > Merge Queries to join two tables like a database join, or Append Queries to stack them.
  • Document your steps. Add a comment to a step (right-click > Properties) or keep a separate note of what each step does.

Troubleshooting

  • Query fails to refresh with a “file not found” error. The source file was moved, renamed, or deleted. Open the query in the editor, go to Home > Data Source Settings, and update the file path.
  • Data looks wrong after refresh. Check the Applied Steps pane for a step that changed unexpectedly (e.g., a column was removed). You can delete a step by clicking the X next to it, or reorder steps by dragging.
  • “Expression.Error” or “DataFormat.Error”. This usually means a type mismatch or a value that cannot be converted. Click the error cell to see details, then adjust the step (e.g., change the column type to Text before splitting).
  • Power Query Editor does not open. Make sure you are using a supported Excel version. On Mac, some features are limited; if the editor does not open, try updating Excel via Microsoft AutoUpdate.
  • Refresh is slow. Large data sources or many steps can slow refresh. Consider filtering early in the query (remove unnecessary rows/columns) and avoid loading to a worksheet if you only need a connection.
  • Cannot find the Get Data button. In older Excel versions, Power Query may be an add-in. Go to File > Options > Add-ins, select COM Add-ins and check if Power Query is listed. If not, you may need a newer version of Excel.

Frequently Asked Questions

Is Power Query available in Excel for Mac?

Yes, but with limitations. Most core features are available, but some connectors and the full Power Query Editor may not be. Check Microsoft’s documentation for the latest feature set on Mac.

Can I use Power Query without programming?

Yes. The ribbon interface lets you perform most transformations with clicks. The Advanced Editor is optional for those who want to write M code.

What is the difference between Power Query and Power Pivot?

Power Query is for extracting, transforming, and loading data. Power Pivot is for data modeling and creating relationships between tables. They are often used together: load cleaned data to the Data Model with Power Query, then analyze it with Power Pivot.

How do I share a Power Query solution?

You can share the workbook containing the queries. The queries are stored in the workbook, but the source file paths may need to be updated by the recipient. For more robust sharing, consider saving the query as an ODC file or using Power BI.

Does Power Query work with online services like SharePoint?

Yes, Power Query includes connectors for many online services, including SharePoint, Exchange, and Salesforce. You will need appropriate credentials and permissions.

Can I undo a step in Power Query?

Yes. In the Applied Steps pane, click the X next to a step to delete it, or use the Undo button (Ctrl+Z) in the editor. You can also reorder steps by dragging.