Forum Discussion

powebibeginner's avatar
powebibeginner
New Member
4 years ago
Solved

Merging duplicate column ID's and placing specific column as a row

Hi, i have been struggling with how to get this working. I tried merging/grouping/transposing, but i dont seem to be doing it right.

 

I have a list of students with grades for different subjects:

IDFirst NameLast NameSubjectGrade
1JohnSmithMath8
1JohnSmithScience9
1JohnSmithEnglish10
1JohnSmithSocial Studies9
2SteveNashMath6
2SteveNashScience7
2SteveNashEnglish8
2SteveNashSocial Studies4
3JamalMurrayMath2
3JamalMurrayScience3
3JamalMurrayEnglish9
3JamalMurraySocial Studies4
4KellyOlynkMath7
4KellyOlynkScience6
4KellyOlynkEnglish8
4KellyOlynkSocial Studies2

 

I want to merge the students all into one row with the addition of the subjects to the headers:

 

IDFirst NameLast NameMathScienceEnglishSocial Studies
1JohnSmith89109
2SteveNash6784
3JamalMurray2394
4KellyOlynk7682

 

Any help or advice would be appreciated.


Thank you

  • =Table.Pivot(PreviousStepName,List.Distinct(PreviousStepName[Subject]),"Subject","Grade")

2 Replies