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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Simon_29
Helper II
Helper II

Merging tables with empty cells

Hello,

I would need to merge these two tables based on the "Order number" column. The problem, however, is that there are empty cells, so he can't match them. However, this data in the second (empty) table may change and it may happen that the required number will be there. Now, however, I would like to combine these two tables and write something like "Order number is missing" in a new column. Is there a solution in Power Query how can this be done?

1_photo.png2_photo.pngThank you very much for your help.

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Simon_29 ,

 

I'm assuming it's only your second table that has order number gaps. If so, then the best thing I think would be to merge the two table on order number, but do a FULL OUTER merge type. This will match up records where they can be matched, but will also keep all the rows that couldn't be matched upon which you can apply some logic to label them as unmatched or similar.

 

If you have blank order numbers in both tables, then you'll probably want to replace blank values in table1 with "noOrderNumber1", and the same in table2 with "noOrderNumber2" or similar, then perform the FULL OUTER merge as before. This will prevent nulls matching with nulls and creating a mess.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
BA_Pete
Super User
Super User

Hi @Simon_29 ,

 

I'm assuming it's only your second table that has order number gaps. If so, then the best thing I think would be to merge the two table on order number, but do a FULL OUTER merge type. This will match up records where they can be matched, but will also keep all the rows that couldn't be matched upon which you can apply some logic to label them as unmatched or similar.

 

If you have blank order numbers in both tables, then you'll probably want to replace blank values in table1 with "noOrderNumber1", and the same in table2 with "noOrderNumber2" or similar, then perform the FULL OUTER merge as before. This will prevent nulls matching with nulls and creating a mess.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Hi,
I've already solved it, @BA_Pete.

Thank you very much for your help 🙂

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors