Forum Discussion

chenko90's avatar
chenko90
Frequent Visitor
2 years ago
Solved

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's avatar
    chenko90
    2 years ago

    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. 

4 Replies

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

    Easiest remedy: change the M code yourself.

    • chenko90's avatar
      chenko90
      Frequent Visitor

      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. 

  • 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.

     

    • chenko90's avatar
      chenko90
      Frequent Visitor

      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.