cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

Expression.Error: The key did not match any rows in the table

I have a data set that has refreshed successfully in the past. It was built 3 days ago and refreshed fine for two days. Now I cannot refresh it either on the desktop version or from services. The error reads Expression.Error: The key didn't match any rows int he table. Other tables return the error message Load was cancelled by an error in loading a previous table. I tried to delete the problematic table from the data set with plans to re add it later. When I deleted the problem table, a second table threw the same error. I removed it too and a third then erred.  It is a domino effect. All tables are failing one at a time. The tables, however, are fine. I can use them in other documents and in PowerPivot. any ideas?

A coworker updated her version and the gateway and is getting the same error. This was built in a group and resides in the group folder.

39 REPLIES 39
Syndicate_Admin
Administrator
Administrator

Not sure if this will help everyone, but I received this error because I had not yet given permissions to the SQL account for the new database I was trying to connect to. Make sure the account you're using has at least read permissions, otherwise this error will be thrown.

Hello @tonysellars,

 

I had same issue and with your trick I manged to fix it.

 

However, in the next steps of the query i got the following message:

 

2017-02-03 15_25_53-Monthly Report TEST_V2 - Query Editor.png

 

Know how to fix this?

 

Thx in advance.

 

Cheers,

Andrea

The query itself contains a lot of metadata related to the source you are pulling from and it seems that this can get a bit out of whack.  The case you are looking at here you have a many different steps you are going through.  The issues for this error have typically been in the source step.  To see all the steps and see how the query progresses you can take a look at the progression as each step generates a result which is operated agaist by the next step.  The original trick to refresh the query, has worked for me and I was glad to see that it seemed to work with Power Query as well as it uses basically the same mechanism.  If you do continue to get an error even after refresh, take a look at the advanced editor and see if something jumps out as not being in sync with your source in one of the later steps.

 

AdvancedEditor.png

 

Hope this helps.

Remove Navigation step, as it attempts to read full table from DB and that does not match with your source querry

My fix was slightly different.  I needed to update the db tables and my credentials, but this solution got me 90% there.  

Syndicate_Admin
Administrator
Administrator

I faced this issue when I changed my schema/authentication credentials. (I was connecting to same database instance - but was connecting to different schemas/username-passwords). 

 

In effect I was connecting to a instance with an user which did not have permission to query the original object saved in the query.

 

Once I updated the user in (Query-> Edit -> Data Source Settings, it refreshed for me.

 

 

Syndicate_Admin
Administrator
Administrator

I faced this issue when I changed my schema/authentication credentials. (I was connecting to same database instance - but was connecting to different schemas/username-passwords). 

 

In effect I was connecting to a instance with an user which did not have permission to query the original object saved in the query.

 

Once I updated the user in (Query-> Edit -> Data Source Settings, it refreshed for me.

 

 

Syndicate_Admin
Administrator
Administrator

Hi, 

I got same error, in my case excel sheet names were different. After changing to same name the problem solved. 

Syndicate_Admin
Administrator
Administrator

Hi, 

I got same error, in my case excel sheet names were different. After changing to same name the problem solved. 

 

Mustafa Yalcin

Hi All,

 

It might be resolved but if anyone had this problem with googla Anyltics API.

 

I found that the solution is to add a custom column and transform the query into a normal table. Otherwise power bi service, in my case, will no identify the correct table. 

 

 

Best,

J.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,374)