Forum Discussion
GibbE155
Jul 18, 2020Copper Contributor
Reorganised a long format table to a wide data table
Hi, I'm struggling to reorganise a data table from long format to a wide format. my data is organised as follows: Value Sample 3456434 1 56645677 1 46356 1 24556 2 235478 2...
GibbE155
Jul 19, 2020Copper Contributor
Hi OwenPrice ,
Thanks, this appears to be the best solution. How do you return the workbook to a normal worksheet after this? The power query editor doesn't appear to allow independent sorting of columns.
Many thanks
OwenPrice
Jul 19, 2020Iron Contributor
You can insert a step to sort the data before it's transformed to ensure it's sorted in the output.
Just sort the value column either ascending or descending in this position in the query:
The result is now:
I've attached the workbook containing the query that includes the sort step described.
In answer to your question, make sure you've used Home>Close & Load to put the results into the workbook. Then select any cell and use Table Design>Tools>Convert to Range.