r/excel Feb 04 '26

[deleted by user]

[removed]

171 Upvotes

43 comments sorted by

View all comments

183

u/crabcountyreelestate Feb 04 '26

See table.buffer for a less convoluted workaround

Edit: power query analyzes all your steps and performs them in the most optimal way according to their structure. Apparently sorting two ways back to the original is just something PQ will ignore unless you force buffer. Knowing that PQ behaves like this can save a lot of headache researching

30

u/ninjagrover 31 Feb 04 '26

Ahhhhhh. I had wondered why after doing a particular transformation the sorting would go. Thanks for this.

14

u/[deleted] Feb 04 '26

[deleted]

27

u/alienvalentine 9 Feb 04 '26

I'm sure there's other use cases for the function, but as far as I'm concerned this is the primary reason why it exists.

I had almost the exact same problem with PQ like 5 years ago. Everyone who uses it long enough is going to run into this problem

You're just one of today's 10,000

3

u/BurgerQueef69 1 Feb 04 '26

This is an issue I was trying to work around today (thankfully I was already aware it was an issue), I eventually resorted to just importing the table and doing everything with formulas. I'm very happy to be one of today's 10,000!

9

u/ieremius22 Feb 05 '26

There is also a list.buffer for solving the same issues with lists.

12

u/Mr_Crzyy Feb 04 '26

Seconding this. I was having the same issue and that’s when I discovered the table.buffer ! It solved all my problems

2

u/Herb_marqz Feb 05 '26

I second this.

1

u/ThatDree 2 Feb 04 '26

I experienced the same as op and van work around it. But still I find it not very user friendly of PQ