Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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:
ID | First Name | Last Name | Subject | Grade |
1 | John | Smith | Math | 8 |
1 | John | Smith | Science | 9 |
1 | John | Smith | English | 10 |
1 | John | Smith | Social Studies | 9 |
2 | Steve | Nash | Math | 6 |
2 | Steve | Nash | Science | 7 |
2 | Steve | Nash | English | 8 |
2 | Steve | Nash | Social Studies | 4 |
3 | Jamal | Murray | Math | 2 |
3 | Jamal | Murray | Science | 3 |
3 | Jamal | Murray | English | 9 |
3 | Jamal | Murray | Social Studies | 4 |
4 | Kelly | Olynk | Math | 7 |
4 | Kelly | Olynk | Science | 6 |
4 | Kelly | Olynk | English | 8 |
4 | Kelly | Olynk | Social Studies | 2 |
I want to merge the students all into one row with the addition of the subjects to the headers:
ID | First Name | Last Name | Math | Science | English | Social Studies |
1 | John | Smith | 8 | 9 | 10 | 9 |
2 | Steve | Nash | 6 | 7 | 8 | 4 |
3 | Jamal | Murray | 2 | 3 | 9 | 4 |
4 | Kelly | Olynk | 7 | 6 | 8 | 2 |
Any help or advice would be appreciated.
Thank you
Solved! Go to Solution.
=Table.Pivot(PreviousStepName,List.Distinct(PreviousStepName[Subject]),"Subject","Grade")
=Table.Pivot(PreviousStepName,List.Distinct(PreviousStepName[Subject]),"Subject","Grade")
Thanks! worked for me!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
53 | |
21 | |
12 | |
12 |