0
votes

So I've got a Power Query script that at one point pivots a table.

This creates a dynamic number of columns.

One of these columns is text, but will usually have a value at the front such as 1. this is a description 2. this is another description etc, up to 34. this is a description.

PowerQuery is sorting these columns alphabetically left to right. However, I would like to sort them by number.

As the number of columns is variable, as are the column names, I cannot Reorder by the explicit column names.

I'm a bit stuck here, so any help would do!

1

1 Answers

2
votes

I believe that PowerQuery will put the pivoted column names in the order that they appear in the column that they are pivoted from, so if you get them sorted how you like before pivoting, then you should get the column order you want.