Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jadewind
Helper I
Helper I

Merge error: "we were unable to determine how many matches the selection will return"

Hi everyone,

 

I have been trying to merge a few tables together. There is a main table and there are a few mapping tables which I use to "recode" a few columns in the main table. The end result will be a new main table with all columns recoded to values that can be easily understood. 

 

While merging the main table with some of the mapping tables, I have this error "we were unable to determine how many matches the selection will return" in the merge screen, and when I click "ok", I get this error:

 

"An error occurred in the ‘Location’ query. Expression.Error: The key didn't match any rows in the table.
Details:
Key=Record
Table=Table"

 

The interesting thing is, I was able to merge these mapping table before, and from some stage it stopped working. And in the merge screen I can clearly see that the keys match. 

 

What should I check to find out what went wrong?

 

Thanks in advance for any suggestions!

1 ACCEPTED SOLUTION
jadewind
Helper I
Helper I

I figured it out myself....I made some changes in the source data (changed the tab name of the spreadsheet) and Power BI doesn't recognize the change so cannot merge any more. I updated the source data in the mapping tables and now the merge works...

View solution in original post

2 REPLIES 2
jadewind
Helper I
Helper I

I figured it out myself....I made some changes in the source data (changed the tab name of the spreadsheet) and Power BI doesn't recognize the change so cannot merge any more. I updated the source data in the mapping tables and now the merge works...

 

 

In my case, I was not accounting for a null scenario in building the value to lookup against. Fixing that is what fixed the error.

 

Specifically, I was trying to concat null and it was failing.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.