Forum Discussion
PhDWoes
9 months agoNew Member
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 l...
- 9 months ago
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
wdx223_Daniel
9 months agoCommunity Champion
NewStep=let a=Table.Group(YourTable,"Sample",{"n",each [Measurement]}) in Table.FormColumns(a[n],a[Sample])