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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
chenko90
Frequent Visitor

Merge Table Switching Column Selection

I have a very odd case that i've never seen before. I am trying to merge two dataflows together and i selected two columns in each dataflow as part of my merge. When i select the two columns it shows that i have matching rows but then when i press ok and let it load it shows me that no data is matching. When i open the merge to see whats going on, my columns are switched in order. I don't understand why power query is switching my column selection without me doing anything. As you can see in the image below column 1 in the first dataflow is showing as column 2 in the second dataflow even thought i had selected for both of them to be column 1. 

 

chenko90_0-1722367237022.png

 

1 ACCEPTED SOLUTION

Based on all my research it seems to have something to do with the filters and sorting that i am doing in one of the dataflows. Microsoft does not seem to like that because the moment i remove those then the merge works fine. I've found a different way to approach my needs that seems to work now but really frustating that power bi is this sensitive to data manipulation sometimes. 

View solution in original post

4 REPLIES 4
PwerQueryKees
Super User
Super User

Interesting. I have never seen this behaviour. So you think you found a severe bug. Microsoft will probably want to see your m code ...

May be you file is corrupted. If you work in excel, you can copy paste all your queries to a new file and see if it makes a difference.

 

Based on all my research it seems to have something to do with the filters and sorting that i am doing in one of the dataflows. Microsoft does not seem to like that because the moment i remove those then the merge works fine. I've found a different way to approach my needs that seems to work now but really frustating that power bi is this sensitive to data manipulation sometimes. 

PwerQueryKees
Super User
Super User

Most likely cause: you did it yourself. Happens to me all the time...

Easiest remedy: change the M code yourself.

Nope didn't do it myself. I've retried the merge about 20 times now and it does it every time. The code  show it correctly but when i open the merge details it shows it incorrectly. I've tried sorting the columns into the order it keeps changing it to and that kind of helped because now the columns are staying the same but now it shows me that i have no data when i pull in the columns, even though i cleary see i have data. 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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