Fix "the key didn't match any rows in the table" in Power BI
Power BI's key didn't match any rows in the table error decoded: the three documented causes — a renamed source table, missing privileges, or mixed credentials — and the schema-refresh fix that actually clears it.
Power BIFix a problem6 min read
A report that refreshed happily for months suddenly fails with Expression.Error: The key didn't match any rows in the table — one of the most-asked errors on Microsoft's forums, and one of the most mechanical to fix once you know what it means.
- Scheduled or manual refresh fails in the service; Desktop may still work, or fail on the same step.
- In Power Query Editor, the error stops the query at a step that picks a table by name.
- It often starts right after someone "tidied up" the database, renamed a sheet or list, or a new file replaced an old one.
Read the error first
Power Query's engine looks tables up by name. Per Microsoft's Power Query documentation, this error means the engine couldn't find the table name it was searching for. To see which name, select the failing step in Applied Steps and read its formula. A navigation step for a SQL table looks like Source{[Schema="dbo",Item="YourTable"]}[Data]. Everything that follows is the three reasons Microsoft lists for a lookup that comes back empty.
What Power Query Editor shows, as of April 2026, when the Navigation step can't find its table:
- APPLIED STEPS: the query's steps, in the Query Settings pane. Select Navigation, the step that picks the table by name.
- The formula bar: that step's formula, here
Source{[Schema="dbo",Item="Orders"]}[Data]. TheItemvalue is the table name the engine searches for. - The yellow error pane: Expression.Error is the error reason, and the message after the colon is the error itself. A step-level error stops the query loading, so no data preview appears under it.
![Power Query Editor with a query named Orders. The Query Settings pane shows PROPERTIES, with the Name box set to Orders and an All Properties link, and APPLIED STEPS with two steps, Source and Navigation, with Navigation selected. The formula bar reads = Source{[Schema="dbo",Item="Orders"]}[Data]. Under it, a yellow error pane with a warning sign says Expression.Error, followed by the message that the key matched no rows in the table. No data preview is shown.](/media/guides/power-query-navigation-step-key-error.2080x800.webp)
Cause 1: the table changed at the source
The usual suspect: the table, view, sheet or list named in your query was renamed, moved or deleted at the source. Two-part fix, and the second part is the one people miss:
- In Power BI Desktop, open Power Query Editor, walk the Applied Steps of the failing query, and repoint the Source/Navigation step at the current name (or restore the old name at the source). While you're there, repair steps that depended on old structure — Changed Type, Renamed Columns, Removed Columns — the repair sequence Microsoft's own Q&A engineers recommend.
- Republish the semantic model. Microsoft's refresh documentation is explicit: a data refresh in the service fails when a source column or table is renamed, because the service doesn't perform a schema refresh. The schema refresh happens in Desktop; the service only learns about it when you publish.
- Step 1Find the new name at the source
- Microsoft Power BIRepoint the Navigation step in Desktop
- Step 3Repair dependent steps
- Step 4Republish to the service
- Step 5Refresh
Don't
- Don't "fix" it by deleting error rows or removing the failing steps wholesale — Microsoft's guidance warns that hides the cause and ships incomplete data.
- Don't rename tables at the source without a plan: a later schema refresh also drops dependent relationships, measures and row-level security built on the old names.
Cause 2: the account can't read the table
Same error, different hole: the credential used for refresh lacks read permission on that specific table, even though it can reach the database. Classic after a security tightening, or when the gateway's stored credential is an account narrower than the author's. Test by connecting with the refresh credential itself; grant read on the table or switch the data source credential in the semantic model's settings.
Cause 3: two credentials, one source
Microsoft documents a third, sneakier cause: multiple credentials for the same cloud data source, which personal cloud connections in the service don't support. It surfaces when colleagues each connected to the same source with different accounts. Standardise on one credential for the source — or, for on-premises sources, route through the on-premises data gateway, which owns a single stored credential.
Still failing?
If the name is right, the privileges are right and the credentials are single, walk the failing query's remaining steps against the current source structure — a changed column type or an unexpected value can halt a step mid-refresh with knock-on lookup errors. Our refresh failures checklist covers the wider sweep from gateways to timeouts.
Sources
- Power Query common issues: the key didn't match any rows — Microsoft Learn
- Data refresh in Power BI: refresh types and schema refresh — Microsoft Learn
- Change data source connection strings: an example navigation step — Microsoft Learn
- Power Query transformation fails during data refresh — accepted answer, Microsoft Q&A
- Dealing with errors in Power Query — Microsoft Learn
Add LowCodeStacks as a preferred source on Google
Did this fix it?
Get the weekly email
New guides and updates from LowCodeStacks, every Tuesday. One email a week, no more.
From LowCodeStacks, Regina, SK, contact@lowcodestacks.com. You can unsubscribe any time, from the link in every email or in your privacy settings. See the Privacy notice.
Comments
No comments yet. Share what worked for you.
Sign in to comment. Comments show under a display name you choose, never your email.