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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
djimenez
Frequent Visitor

PowerBI-Power Query: Merge Not Maintaining Matching Columns Order

Hello, I am expericing a strange issue with Power Query when I try to merge two tables.

 

I specify the columns I would like to merge in Table 1 with Table 2 here:

djimenez_1-1708971979228.png

When I click OK, it merges. But once I expand Table 2, I can see they do not merge correctly based off the columns I selected to be merged.

 

When I click back to the merge step, I see the order of the columns I selected has CHANGED without me doing so:

djimenez_2-1708972204734.png

Does anyone have any idea why this is happening? I have tried to refresh the tables and reselect the columns over and over again but the same thing keeps happening. So weird. Any insight would be greatly appreciated.

 

Thank you.

2 REPLIES 2
scott_thomson
Regular Visitor

Hi There, yes we have got the same issue which seems to have started out of the blue end of March or beginning of April.  There is nothing wrong with the M Code but Power BI interprets it in a different order.  I suspect this is a new bug introduced by a Microsoft Monthly release.

Even reselecting the order of the columns in the second join table does not fix this.

However I may have a workaround until Microsoft fixes this.  I suspect that it is ordering the columns in the second table according to the order they are defined in that table, hence the 1,2,3 etc.
So the workaround is to re-order the selection of the first table to match that of the second table.  So basically select the first table according to the default column order of the second. 

This seems to have worked for me.  However note that the Edit Step wizard view switches them again so cannot be trusted!

Jonvoge
Super User
Super User

Out of curiosity: Does the error persist if you reorder the order of your columns, to the same order that you are selecting them, before doing the merge?

_____________________________________________________
I hope my comment was helpful.
If your question was answered, please mark your post as 'Solved' and consider giving me a 'Thumbs Up'.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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 Solution Authors