Forum Discussion
Anonymous
5 years agoNot applicable
Table.Sort --- not sorting correctly
OK its the end of the week but and a simple sort is defeating me.... So I want to sort a table by two columns and then I will remove duplicate so keeping the top most one of each - works normally...
- 5 years ago
Hi Anonymous ,
Table.Sort (and List.Sort) won't keep their order without a Buffer-function around it:
https://community.powerbi.com/t5/Community-Blog/Bug-warning-for-Table-Sort-and-removing-duplicates-in-Power/ba-p/810390
Don't ask...
Anonymous
5 years agoNot applicable
So the work around was to create a temp column with the columns wanted to sort.
But still none the wiser why the Sort method is not giving the expacted results.
Andrew
ImkeF
5 years agoCommunity Champion
Hi Anonymous ,
Table.Sort (and List.Sort) won't keep their order without a Buffer-function around it:
https://community.powerbi.com/t5/Community-Blog/Bug-warning-for-Table-Sort-and-removing-duplicates-in-Power/ba-p/810390
Don't ask...
- Anonymous5 years agoNot applicableHi ImkeF I was just running a test with a Table.Buffer as your message came in and I can confirm it solves the issue. I think i picked this up from one of your articles in the past and then obviously end of the week haze forgot all about it. It is a bit nuts that the command need to be wrapped to make it useful. Thanks again Andrew