Easy Trick for Sorting Columns in Power Query #shorts

preview_player
Показать описание
Did you know you can custom sort your columns in Power Query with this trick? It's a cool hidden Power Query feature in Excel.

Here is a simple trick on how to automatically sort columns in Microsoft Excel Power Query.

🚩Let’s connect on social:

👉 This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!

#Excel
Рекомендации по теме
Комментарии
Автор

Thank you for the tip, Leila. There is an another alternative solution - just select the columns one-by-one in the order of your sorting and when the last column is selected just run 'Remove Other Columns ". No columns will be removed, but they willbe sorted instead.

ivanmamchych
Автор

Thank you Leila. This just saved me hours of work!

MattHuxley
Автор

Yes, dragging just one or two columns about across a large number of columns can be really slow.
In extreme cases here is my trick. Drag the column you want to move just one column to left or right. In the PQ formula bar edit the M-Code function just written. This is just the command and a long list of column names in the current order. Cut the name of the column you wanted to move and insert in the right place - done. A newly written custom column can be moved from the right of 60 columns to the 1st position in about 15 secs - a lot faster and cleverer than dragging it all that way.

antique-bsbb
Автор

Nice tip, but what are the odds your alphbetical order will match the column order you desire.

Michael_Alaska
Автор

I don’t know what Power Query is, but in Excel, it is easy to do. Thank you. Matti

Justusosaa
Автор

Weird they don't have a "Customized order" option. That's would be super obvious to add there.

thuglaza
Автор

That's a great trick.

However - the names of the columns are hardcoded.

Of course - if the source of fata is prepared properly that shouldn't be a problem.

However if there's a possibility to changes in the column names the other way to achieve sorting columns by their names will be (with advanced editor):

- get the names of column to the list
- sort the list
- use the sorted list to rearrange the columns order with the function

(to be honest - all the steps above require functions, it's not to be made with PQ GUI).

pawekasprowicz
Автор

You are incredible 💓, fantastick so interesting and useful.

harycan
Автор

Thanks Leila! Is there a way to sort the columns in Table View?

jesus
Автор

Well i see that was sorted out by the starting number and not alphabetically. but thanks for the tip!

reng
Автор

There is already a native way in Excel to do this.
just use custom sorting, from left to right, line 1.

eugeniosilvaconceicao
Автор

But do they have to be numbered 1-, 2-, etc.
Be better if they could be dragged to desired sort arrangement.

DaveWilliamsj
Автор

Hi, Leila Gharani! 💕
First of all How are you?
Then if we want to contact you how we can because you don't mentioned any contact way in about section.

profnaseersafi
Автор

Don’t see why someone would’ve labeled them that way, but not have put them in the correct order in the first place.

FurleyGhost
Автор

This is not a solution to the issue you presented, and there is none to that aside from dragging it. Power query has a long way to go.

keremardicli
join shbcf.ru