Excel Power Query Won’t Refresh? Fixes That Work

Errors & fixes · Updated November 22, 2026

If your Excel Power Query won’t refresh, the cause is almost always one of three things: a changed data source path, a blocked privacy level, or a query that uses a connector requiring a gateway or sign-in. Start by checking the source path (Data > Queries & Connections > right-click query > Properties > Source), then set your privacy levels to ignore (File > Options > Data > Privacy), and finally verify that you’re not using a connector that requires a gateway. Below are the detailed fixes and the background you need to prevent this from happening again.

Why Power Query Refreshes Fail: The Core Mechanics

Power Query is Excel’s data transformation engine, introduced in Excel 2016 and refined in Microsoft 365. When you refresh a query, Excel re-runs every step in the query’s M language script, from connecting to the source to loading the final table back into your worksheet or data model. A refresh failure means one of those steps encountered an error. The most common error messages are:

  • “Data source credentials” – the connection string or login is wrong or expired.
  • “Privacy levels” – Excel is blocking a merge or combine because it thinks the sources are private.
  • “Cannot connect to the source” – the file, database, or URL is unavailable.
  • “This connector requires a gateway” – you’re trying to refresh an on-premises source in a cloud service.

Each of these has a specific fix, and the fastest way to see the exact error is to right-click the query in the Queries & Connections pane and choose Refresh. The error message will appear in a dialog box, and it will tell you which step failed.

Step-by-Step: Diagnose and Fix the Refresh Error

Follow these steps in order. Most refresh issues are resolved by step 3.

  1. Check the source path. In the Queries & Connections pane (Data > Queries & Connections), right-click the query and select Properties. Go to the Definition tab and look at the Source field. If the source is a file, make sure the file still exists at that exact path. If you moved it, click Edit to open the Power Query editor, then change the source step to the new location.
  2. Clear credentials. Go to File > Options > Data > Clear All Credentials. Then refresh the query. Excel will prompt you to re-enter the password or login. This fixes most authentication errors.
  3. Set privacy levels to ignore. File > Options > Data > Privacy > select Ignore the Privacy Levels and potentially improve performance. This is the single most common fix for queries that merge data from two different sources (e.g., a folder and a SharePoint list).
  4. Check the data source settings. Data > Get Data > Data Source Settings. Here you can see all defined sources. If a source is marked as Missing, that’s your problem. Select it and click Edit Permissions to update the path or credentials.
  5. Verify the refresh type. If you’re refreshing a query that loads to a PivotTable or data model, make sure you’re refreshing the correct one. Right-click the PivotTable > Refresh is not the same as refreshing the query. Use Data > Refresh All to refresh everything.

Common Causes and Their Specific Fixes

Here are the most frequent scenarios you’ll encounter, with targeted solutions.

  • File path changed: If you moved the source Excel file, the query breaks. Edit the query and change the file path in the Source step. To avoid this, use a relative path or store the source in a fixed location.
  • SharePoint or OneDrive sync issues: If your source is on SharePoint, ensure you’re using the correct URL. Sometimes the “SharePoint” connector requires the site URL, not the file URL. Use the Get Data > From SharePoint option and paste the site address.
  • Web source requires login: If you’re pulling from a web page that has changed its login system, the query may fail. Clear credentials and re-authenticate. For APIs, check if the API key has expired.
  • Database server is down: If you’re querying SQL Server, the server might be offline. Test the connection with a tool like SQL Server Management Studio. Also, check if the database name or table name was renamed.
  • Power Query is disabled: In rare cases, an add-in conflict can disable Power Query. Go to File > Options > Add-ins, check if the Power Query add-in is listed as inactive. If so, re-enable it.

How to Prevent Refresh Failures in the Future

Prevention is better than fixing the same error repeatedly. Adopt these practices:

  • Use named ranges or tables as sources instead of raw cell references – they are more stable.
  • Store source files in a dedicated folder and avoid moving them. If you must move them, update the query immediately.
  • Set privacy levels to ignore once you’re sure your data is safe. This avoids the most common merge error.
  • Schedule refreshes carefully – if you’re using Excel Online or Power BI, make sure the gateway is installed and running.
  • Keep your Excel version updated – Microsoft 365 updates often include Power Query bug fixes.

Power Query vs. Excel’s Older Data Connections

If you’re used to classic connections (Data > Connections), you might wonder why Power Query behaves differently. Classic connections are simple – they just re-run a SQL query or a web query. Power Query is a full ETL tool: it can combine multiple sources, transform columns, and load to multiple destinations. That power comes with more failure points. For example, a classic connection to a folder of files just reads one file. Power Query can read a folder and combine all files, but if one file in that folder is corrupt, the refresh fails. The fix is to add a step that filters out corrupt files or to handle errors with the try and otherwise functions in M.

When You Can’t Fix It: Alternatives to Power Query Refresh

Sometimes the source is simply unreachable, or the query is too complex to debug. In those cases, you have alternatives:

  • Use a classic connection if your source is a simple table or SQL view. Go to Data > Get Data > From Other Sources > From SQL Server, and use the legacy wizard.
  • Copy and paste values – if you don’t need automatic refresh, you can just paste the data as values. This is a one-time fix, not a long-term solution.
  • Use Power Pivot – if your query loads to the data model, you can often work around a refresh failure by re-importing the data manually.
  • Switch to Power BI – if your data is large and you need scheduled refreshes, Power BI has a more robust refresh engine with better error reporting.

Frequently Asked Questions

Why does my Power Query refresh work in Excel but not in Power BI?
Power BI uses a gateway to access on-premises sources. If you haven’t installed and configured the gateway, refreshes will fail. Also, Power BI has different privacy level settings – check those in the Power BI service.

Can I refresh a Power Query from a macro?
Yes. You can use VBA to refresh all queries with ThisWorkbook.RefreshAll. But note that macros cannot be undone with Ctrl+Z, so save a copy of your workbook before running a macro that refreshes queries.

Why does my query refresh very slowly?
Slow refreshes are usually due to large data volumes or complex transformations. You can speed it up by reducing the number of rows loaded, disabling the “Load to worksheet” if you only need the data model, and using query folding – which means letting the source database do the filtering.

What does “Data source error” mean?
This is a generic message. It usually means the source is unreachable. Check the credentials, the path, and whether the source is online. Double-click the error in the Queries & Connections pane to see the full error text.

How do I refresh only one query?
Right-click the query in the Queries & Connections pane and select Refresh. Or, in the Power Query editor, go to Home > Refresh Preview to see the current data without loading it to the worksheet.

Will refreshing a query overwrite my formulas in the worksheet?
Yes, if the query loads to a worksheet, it will overwrite the cells in that range. To avoid this, load the query to the data model only (Data > Get Data > From Other Sources > Blank Query, then load to the model) or to a separate worksheet.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Errors & fixes

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.