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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
djimenez
Regular 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
Solution Supplier
Solution Supplier

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors