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.

38 REPLIES 38
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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (2,064)