Error:
Refreshing Power BI report generates “The key didn’t match any rows in the table” error.
Cause:
Click “Edit Queries” button. If you do not see the error message, click “Refresh Preview” button. Once you have the error message, click “Go To Error“.
Error message will remain, but you should have “Edit Settings” button now, click it.
In the next screen, Navigation, you should see what exactly Power BI is trying to access but cannot do so.
In my example, I have an Excel file as my source. When I first connected to this data source, my Table name was Table1. Yesterday I changed where my Excel file gets data from and this, in turn, changed Excel’s Table name to “report“.
Obviously, when Power BI tries to refresh the data, it cannot find Table1 table anymore.
Solution:
In the same Navigation screen, selecting my new Table name “report” will fix the issue assuming all other columns in the Excel file are the same.
Same is true for any data source, not only Excel file. Follow same steps to identify what’s causing the error and then fix it as needed.