Your report works perfectly in Power BI Desktop. You publish it, set up scheduled refresh, and the next morning you get the email: "Refresh failed". The data in the report is now old, and users are asking why.
Refresh errors look scary, but almost all of them come from the same 9 causes. This guide explains each error message in plain language and tells you exactly how to fix it.
Quick answer: Open the workspace, go to the semantic model's Settings and check Refresh history for the exact error. Most failures are fixed by re-entering data source credentials, installing or reconnecting an on-premises data gateway for local files and databases, or fixing a column that was renamed or removed in the source.
First: find the real error message
- Open the workspace in Power BI Service.
- Hover over the semantic model (dataset), click More options (…) → Refresh history.
- Click Show next to the failed refresh to see the full error and the table or query that failed.
Copy the first lines of the error, then find the matching section below.
1. Data source credentials are invalid or expired
Error: "The credentials provided for the data source are invalid" or "Data source error: Login failed".
Why: A password changed, an OAuth sign-in expired, or credentials were never entered after publishing.
Fix: Semantic model Settings → Data source credentials → Edit credentials. Sign in again with an account that can read the source. For SharePoint and OneDrive files choose OAuth2.
2. Gateway is missing, offline or not mapped
Error: "You can't schedule refresh for this semantic model because it requires a gateway" or "The gateway is either offline or could not be reached".
Why: Power BI Service in the cloud cannot reach files on your laptop or databases inside your company network without an on-premises data gateway.
Fix:
- Install the on-premises data gateway (standard mode) on a machine that is always on, not a laptop that sleeps.
- In Service, open Settings → Manage connections and gateways and add a connection for each data source (server and database names must match Desktop exactly).
- In the semantic model settings, under Gateway and cloud connections, map each source to that connection.
- If the gateway shows offline, restart the gateway service on that machine and check its internet access.
Read more in Understanding Power BI Gateways.
3. The file path does not exist
Error: "Could not find file 'C:\Users\…\Sales.xlsx'".
Why: The report points to a file on your own computer. The Service (or the gateway machine) cannot see that path.
Fix: Move the file to OneDrive for Business or SharePoint and connect with the SharePoint folder or Web connector using the online URL. Cloud files refresh without any gateway. If the file must stay on a network share, use a UNC path like \\server\share\Sales.xlsx and a gateway that can reach it.
4. A column was renamed or removed
Error: "The column 'Region' of the table wasn't found".
Why: Someone renamed a column in the Excel file or database. Power Query steps such as Changed Type still refer to the old name.
Fix: Open Transform data, click the first step that shows an error, and update the column name. Ask source owners not to rename columns, or rename them in Power Query instead of in the file. Learn Power Query basics in How to Transform and Clean Data with Power Query.
5. Data type conversion errors
Error: "DataFormat.Error: We couldn't convert to Number".
Why: A number column now contains text such as "N/A", or dates arrive in a different format.
Fix: In Power Query, before the Changed Type step, use Replace Values to clean known bad values, or after it use Replace Errors to turn errors into null. For dates from another locale use Change Type → Using Locale.
6. Privacy levels and the Formula.Firewall
Error: "Formula.Firewall: Query references other queries or steps, so it may not directly access a data source".
Why: One query combines data from two sources with different privacy levels, or passes values from one source into another.
Fix: Set the correct privacy level for each source (File → Options → Data source settings → Edit Permissions in Desktop, and in the Service credentials dialog). Better long term: load each source in its own query, then merge those queries, instead of calling one source inside another.
7. Refresh timed out
Error: "The refresh operation timed out" or it simply stops after a long time.
Why: Scheduled refresh in shared capacity (Pro) is limited to 2 hours per refresh; Premium capacity allows 5 hours. Large tables or slow queries exceed that.
Fix:
- Remove columns and rows you do not need, as early as possible in Power Query.
- Make sure filters fold back to the database (right-click a step → View Native Query).
- Use incremental refresh so only recent data is reloaded. See Power BI Incremental Refresh.
8. Memory or size limits
Error: "The semantic model exceeds the maximum size" or out-of-memory errors.
Why: With Pro, a semantic model can be up to 1 GB. Refresh needs extra memory while it runs.
Fix: Remove unused columns (especially high-cardinality text and IDs), avoid calculated columns where a measure works, switch off Auto date/time, and summarise detail tables. Read Why Power BI Reports Become Slow for more ideas.
9. Dynamic data source cannot be refreshed
Error: "This dataset includes a dynamic data source. Since dynamic data sources aren't refreshed in the Power BI service, this dataset won't be refreshed."
Why: A query builds a URL or file path from variables, for example looping through API pages with Web.Contents("https://api.site.com/page=" & Text.From(n)).
Fix: Keep the base URL static and move the changing part into options:
Web.Contents(
"https://api.site.com",
[ RelativePath = "orders", Query = [ page = Text.From(n) ] ]
)
Power BI can then validate the source and refresh it.
Two silent reasons refresh stops
- Four failures in a row: Power BI turns off scheduled refresh after repeated consecutive failures. Fix the error, then switch scheduled refresh back on.
- No one uses the report: if a report is not opened for about two months, scheduled refresh is paused. Opening the report or refreshing it manually turns it back on.
Also remember the daily limits: up to 8 scheduled refreshes per day with Pro and up to 48 with Premium capacity.
Refresh troubleshooting checklist
- Read the full error in Refresh history.
- Does a manual Refresh now in the Service fail too?
- Does refresh work in Desktop? If not, the problem is in the query or source.
- Are credentials valid for every data source?
- Do local files or databases have a gateway that is online and mapped?
- Did any column, sheet or table name change in the source?
- Is the refresh close to the time or size limit?
- Is scheduled refresh still switched on?
Frequently asked questions
Why does refresh work in Desktop but fail in Power BI Service?
Desktop runs on your computer with your access and files. The Service runs in the cloud and needs credentials, cloud locations or a gateway to reach the same data.
Do I need a gateway for Excel files on SharePoint or OneDrive?
No. Files in SharePoint or OneDrive for Business refresh directly from the cloud. You need a gateway only for on-premises sources such as local files, network shares or company SQL servers.
How often can Power BI refresh automatically?
Up to 8 times a day with Pro and up to 48 times a day with Premium capacity. For real-time needs, consider DirectQuery or streaming data.
Can I get an email when refresh fails?
Yes. In the semantic model's scheduled refresh settings, keep Send refresh failure notifications on and add other contacts if needed.
Keep learning
Refresh problems are much easier to avoid with a clean data model and good Power Query habits. Follow the full Free Power BI Course, and bookmark this page for the next time you see "Refresh failed".
Which refresh error are you seeing? Paste the first line of the message in the comments and I will help you find the cause.
