LowCodeStacks™
Sign in

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

Checked against Microsoft Learn 5 sources · Updated By · drafted with AI help, checked by a personHow we write guides

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.

The error Expression.Error: The key didn't match any rows in the table means the engine couldn't find the table that a step names, for example a navigation step Source{[Schema="dbo",Item="YourTable"]}[Data]. It has three documented causes, each with its fix. Cause 1, the table changed at the source: it was renamed, moved or deleted. Fix: repoint the Source or Navigation step in Power BI Desktop, repair the dependent steps such as Changed Type, then republish and refresh, because the service doesn't do a schema refresh. Cause 2, the account can't read the table: the refresh credential can reach the database but not this table. Fix: test with the refresh credential, then grant read on the table or switch the data source credential in the semantic model's settings. Cause 3, two credentials for one cloud source, which personal cloud connections don't support. Fix: standardise on one credential, or for on-premises sources use the gateway's single stored credential.
The error means the named table wasn't found: a renamed source, missing read permission or mixed credentials, each with its own fix.
  • 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:

  1. APPLIED STEPS: the query's steps, in the Query Settings pane. Select Navigation, the step that picks the table by name.
  2. The formula bar: that step's formula, here Source{[Schema="dbo",Item="Orders"]}[Data]. The Item value is the table name the engine searches for.
  3. 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.
Recreated by LowCodeStacks from Microsoft Learn screenshots (CC BY 4.0): Power Query Editor with a step-level error on the Navigation step, interface as of April 2026, with made-up names.

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:

  1. 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.
  2. 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.
The rename repair
  1. Step 1Find the new name at the source
  2. Step 3Repair dependent steps
  3. Step 4Republish to the service
  4. 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

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.