2
votes

I have mismatched data lines in a power query so I am attempting to renumber/reorganize the data then merge the information to realign.

Here, I want the data in Column Answer 2 to go into column Answer, cells 6,7,11,12.

Screenshot 1

I've indexed each of my files and merged the queries. However, when I expand the merged queries, PQ seems to randomize my data.

Screenshot 2

I'm new to PQ so I don't really write the 'code', just use the user interface.

As you can see from the second image, the data comes out in the wrong order.

1
Welcome! Could you edit your post to embed the images rather than having the reader click on the links? This will help a lot. Thanks!Gene Z. Ragan
The sort order of the rows should not have an impact on your visuals/report. Can you explain why do you need the order to be same?Gangula
I'm trying to move the values in the Answer 2 column to the Answer column but two rows lower than they currently sit. Perhaps I'm doing it inefficiently, but I'm essentially renumbering/reindexing each line then merging the 4 queries and doing a conditional column to merge the 5 respective columns into 1 column. So, the stack order has to be correct.R. Dawg
Probably the answer in the following forum question helps you out: social.technet.microsoft.com/Forums/en-US/…Gangula
I saw that earlier while I was googling but don't really know how to insert that code? Technically, I think I may be wrong about stack order. Ultimately, I'm trying to get to two columns of data and then I'm going to pivot the data. After that, I can reorder the columns however I want so I suppose you're right. Stack order doesn't really matter so long as the information ends up in the correct row. Thanks!R. Dawg

1 Answers

3
votes

I merged two tables, then added index column and moved it to the beginning, then expanded the merged table and deleted index column. The order of rows has left the same, as in the source table.