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 -
Here's what worked for me:
- Have your replacement source file (e.g. excel file) ready to go. Make sure the file name and sheet names are the same.
- Then in PBI, in the Fields panel, right-click on the troublesome field. Delete it. The graph it populates will be replaced by a placehoulder saying "Something's wrong with one or more fields. Fix This". DON'T DO ANYTHING to the graph at this point.
- Instead, imediately click on Get Data. Select the new file and in a moment or two your graph should re-populate with the new data, and even retain the original formatting (e.g. colors, etc.). Hope this works for you.
- erik--9 years agoFrequent Visitor
I ran into this error and learned that the navigation step in the query was referring to a SQL table and that the table name was case significant. I had changed the database table from "sales" to "Sales" and ran into the thread title error both from PowerBI on my desktop and PowerBI web service. I capitalized the table name in the navigation step and everything went back to working as it previously was. Different cause, but wanted to share my experience and fix.
- Anonymous8 years agoNot applicable
Again, a different cause - similar to Erik's post -the user's permissions were accidentally altered on a SQL Server database so that the table was no longer available (ie no SELECT was granted) and the error will occur. Can reproduce error (SQL 2014 and 2016). So check your table permissions just in case something has changed.
- erik--9 years agoFrequent Visitor
I ran into this error and learned that the navigation step was referring to a SQL table and that the table name was case significant. I had changed the database table from "sales" to "Sales" and ran into the thread title error both from PowerBI on my desktop and PowerBI web service. I capitalized the table name in the navigation step and everything went back to working as it previously was.