Problem: I have about 400 rows of data in an Excel spreadsheet. How can I group it so that id, fullname, admit_yr, deg_grant_yr, and current_major appear as rows, sessyr appears as columns, and the value shown is session_major?
Example data:
id,fullname,sessyr,admit_yr,deg_grant_yr,current_major,session_major
220926,Student1,FA2023,2020,2024,OTBS,OTBS
Solution: Power QueryThis is the cleanest way to pivot your session majors into columns without aggregation issues:
- Select your data range → Data tab → From Table/Range
- In Power Query Editor, select the
sessyr column - Go to Transform tab → Pivot Column
- Set "Values Column" to
session_major - Click Advanced options → select Don't Aggregate
- File → Close & Load to return to a new sheet
This will give you columns like FA2023, SP2024, etc., with the actual major text displayed.
Addtional documentation (written by BooodleBox) included