Forum Discussion
PhilippeMuniesa
3 years agoResolver I
powerquery sort based on two columns
hello, I have a table with three columns, and I would like to sort on 2 columns, I do not find how to do. While waiting for a relevant solution, I merged the two columns and sorted it out, but ...
Einomi
3 years agoHelper V
Can you explain shortly why it is not a good idea to sort data in PQ ?
bourquejeff1975
1 year agoNew Member
Hi! I'm not sure why PQ strips out sorting when merging queries sometimes, but the fix is this:
- After sorting the columns, click on the "fx" button in the formula bar (on the left)
- Put the code after the "=" in parenthesis, and add the "Table.Buffer" function in front
Example:
= Table.Buffer(#"Sorted Rows1")
This somehow makes the sorting "stick" no matter what else you do.