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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ckampen
New Member

PowerBI Merge queries not matching correctly on mixed format IDs

I am trying to merge two tables in PowerBI, the IDs have two formats: 7 numbers or 2 numbers-2 letters-2 numbers, I have attached a preview below. When merging the queries (left outer) it matches the number format well but it does not seem to match the combined format. I have done a manual check using Excel, and there I am able to match the combined formats. 

 

For both tables I have cleaned, trimmed, and uppercased the columns, both columns are set to text. Does anyone have an idea why it might still not match properly? 

 

Thanks!

 

ckampen_0-1722849463662.png

 

1 ACCEPTED SOLUTION
ronrsnfld
Super User
Super User

In Power Query on the data samples that do not match, do a character by character comparison looking at the ASCII codes to see if they match. Or post something here that can be used to reproduce your problem.

 

 

List.Transform(Text.ToList([Column1]), each Character.ToNumber(_)) = List.Transform(Text.ToList([Column2]), each Character.ToNumber(_))

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @ckampen ,
According to your description, the merge operation in power bi is not able to match appropriately, if there is a null value it may be due to the data being followed by spaces. You can check if there are spaces present. If you still can't solve the problem, you can provide sample data, so that we can help you faster.

Best regards,
Albert He

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

ronrsnfld
Super User
Super User

In Power Query on the data samples that do not match, do a character by character comparison looking at the ASCII codes to see if they match. Or post something here that can be used to reproduce your problem.

 

 

List.Transform(Text.ToList([Column1]), each Character.ToNumber(_)) = List.Transform(Text.ToList([Column2]), each Character.ToNumber(_))

 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.