Forum Discussion
Need Help with "Key Didn't Match Any Rows" Error When Refreshing Dataset Across Workspaces
I am facing an issue when trying to refresh a dataset linked to a Dataflow in two different Power BI workspaces. Specifically, the dataflow resides in Workspace A, while the dataset is located in Workspace B. Although the dataflow refreshes correctly and operates perfectly in Power BI Desktop after the refresh, I encounter an error message when trying to refresh the dataset:
Expression.Error: The key didn't match any rows in the table.. Key = [workspaceId = "1123456"]. Table = #table({"workspaceId", "workspaceType", "Data", "workspaceName", "Tags", "ItemKind", "ItemName", "IsLeaf"}, {}). ;The key didn't match any rows in the table.. The exception was raised by the IDbCommand interface. Table: DimDepartamentos.
All tables have data
3 Replies
- AnonymousNot applicable
Hi, eujoaoalves
You can check for duplicates to make sure there are no duplicate values in the primary key field of the data source. Duplicates can cause this error. You can check the following link:
Solved: Salesforce dataset won't refresh - key didn't matc... - Microsoft Fabric Community
Solved: Scheduled update not working - Microsoft Fabric Community
Verify the data type to ensure that the data types of the key columns in the two tables match. Data type mismatch can cause this issue.
Review the query in Power BI to make sure that the key-value is being referenced correctly. Sometimes, changes in the database or data flow can cause discrepancies.
If there have been recent updates or changes in a dataflow or dataset, make sure that all references are up to date. This includes checking for any changes in table names, column names, or data types. You can check the following post:Solved: Dataset not refreshing - The key didn't match any ... - Microsoft Fabric Community
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- djurecicSuper User
Hi eujoaoalves ,
This errror can occur when a field name has changed or is not included in the dataset. Check out the following article: https://blog.crossjoin.co.uk/2020/04/06/understanding-the-the-key-didnt-match-any-rows-in-the-table-error-in-power-query-in-power-bi-or-excel/
- eujoaoalvesRegular Visitor
Hi djurecic ,
Nothing changed. In Power Query (on dataflow), I checked all tables and steps and didn't find any errors.
The dataflow was updated without errors, and I refreshed my PBI on desktop and it worked fine.