Transforming data from two columns into sample grouped columns
Hello to all,
I am a new adventurer into data analysis, and want to learn how to use Excel more efficiently.
What I want to do is shown below - to change my existing data from 2 columns that list the name of the sample and its measurements, to a table where each sample is its own column with its measurements listed below it in rows. It's imperative that the measurements stay in their order.
I have tried to use Powerquery, but most I can do is Group the samples by their name - but this only gives me a link to table that shows the measurements for that sample.
All help is appreciated!
Best regards,
PhD Student
Hi PhDWoes,
You’re describing a classic Power Query reshape: take a 2-column list like [Sample, Measurement] and “pivot” it so each Sample becomes a separate column, with the measurements stacked in order down the rows. The key to preserving order is to create a per-Sample index first, then pivot on Sample using that index as the row key.
See this link for guidance:
Pivot columns (Power Query) - Microsoft SupportIf you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
~Taylor Amy