Forum Discussion

David111's avatar
David111
New Member
1 year ago
Solved

Error processing data in dataset - The key didn't match any rows in the table

Hi 

I have created a report that joins two sql server views in a 1:Many relationship with one view containing the supervisors and the the other their trainees. Ths is the relationship:

It all works fine in the desktop app and I can refresh the datasets there no problem, however when I try to refresh the semantic model in the web version I get the error message below:

I have searched the "The key didn't match any rows in the table" part of the message extensively and it usually applies to excel sourced datasets where one of the column names has changed. This is not the case here. I have also confirmed that there are no IDs in the child view (vwPowerBi_SupervisorTrainees) that do not exist in the parent view.

Any help\ideas would be much appreciated.

Regards

David

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, David111 

    You need to check that the data types of the join columns are consistent. If the data types are different, it may cause the match to fail. If there is a null value (NULL) in the join column, it can cause the match to fail. Consider handling null values in join conditions.

     

    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.

  • Hi Anonymous 

    Thanks heaps for the response. I checked the datatypes and one was varchar(10) and the other nvarchar(20), so I tried casting them both as varchar(10), but it made no difference. I even tried casting them both as ints. I also confirmed there are no null values returned for these fields in either view.

    It is definitely this join causing the issue. When I remove the vwPowerBI_SupervisorTrainees view from the report, I am able to refresh the dataset (but don't have the information I need).

    Regards

    David