Forum Discussion
Expression.Error: The key did not match any rows in the table
- 10 years ago
Ran into this issue myself within the Power BI Desktop and was able to resolve the issue through the following:
- Select Edit Queries from the menu to open the Query Editor
- Use the left hand menu to select one of the queries having the issue (will have the triangular warning sign)
- On the applied steps menu at the right select the source step.
- In the top menu bar, select Refresh Preview.
In my case there were several queries having this same issues and the steps above resolved each of them.
Hope this helps -
Ran into this issue myself within the Power BI Desktop and was able to resolve the issue through the following:
- Select Edit Queries from the menu to open the Query Editor
- Use the left hand menu to select one of the queries having the issue (will have the triangular warning sign)
- On the applied steps menu at the right select the source step.
- In the top menu bar, select Refresh Preview.
In my case there were several queries having this same issues and the steps above resolved each of them.
Hope this helps -
- Florent-Shawns10 years ago
Advocate I
Hi Tony,
I have the same error but I am using power query in Excel. I am using a personal gateway, here is my error message below:
- carvalho2710 years agoNew Member
Nothing changed - 1 day it worked - the next day refresh bombed with this message
The refresh preview approach did not resolve the issue for me.
I created new connections to the same data source and then used Advanced Edit to copy the new connection strings to my original tables.
Has Microsoft acknowledged this is a PowerBI Desktop issue ?Anybody understand the root cause ?
- Anonymous9 years agoNot applicable
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:
Know how to fix this?
Thx in advance.
Cheers,
Andrea
- tonysellars9 years ago
Advocate II
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.
Hope this helps.
- Novus9 years agoRegular Visitor
Remove Navigation step, as it attempts to read full table from DB and that does not match with your source querry
- Anonymous9 years agoNot applicable
My fix was slightly different. I needed to update the db tables and my credentials, but this solution got me 90% there.
- nairisha10 years ago
Advocate I
Thak you. It solved my problem but do you know why it happened in the first place?
- TvptRslv9 years agoNew Member
This did not work for me either. I connected to a database, then copied some views into that db. PowerBi keeps giving me the message about keys not matching.
I've gone into each view to change the source to the new db and then hit refresh but i still get the message of keys not matching. Any suggestions?
- veeek89 years agoNew Member
I also had this problem and the reason is that every time I download the raw data from salesforce, the worksheet is given a different name, so the worksheet name needs to be updated in each query under 'navigation'. I have only had this issue since importing xls files rather than csv's, so might just go back to csv's.
- veeek89 years agoNew Member
This issue happened to me and it is because whenever I download the raw data from Salesforce it gives the worksheet within the xlsx file a different name. I have to go into each query and update the worksheet name under 'navigation'. This problem has only occured for me since importing xls files rather than csv, might just go back to using csv's
- jetboy2k9 years ago
Helper I
Thanks! This fixed the problem for me!
- Asfia4 years agoNew Member
Awesome, it worked for, me as well! Thanks a lot😃
- Anonymous3 years agoNot applicableAwesome .. thanks for Quick Solution
- danica002 years agoRegular Visitor
Thanks for providing a solution! I've tried this as well but I have an issue where the data takes a very long time to load. This is because the table is a reference table from a RaaS API connection. Do you know if this is the reason the key did not match any rows in the table or am I dealing with a different beast?