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
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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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