let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Student ID"}, {{"Data", each _, type table [First Name=text, Last Name=text, Student ID=number, Gender=text, Grade Lev=number, #" Homeroom Teacher "=text, SPRING SEMESTER PLACEMENT=text]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Data],"Index",1,1)),
#"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Custom"}),
#"Expanded Custom" = Table.ExpandTableColumn(#"Removed Other Columns", "Custom", {"First Name", "Last Name", "Student ID", "Gender", "Grade Lev", " Homeroom Teacher ", "SPRING SEMESTER PLACEMENT", "Index"}, {"First Name", "Last Name", "Student ID", "Gender", "Grade Lev", " Homeroom Teacher ", "SPRING SEMESTER PLACEMENT", "Index"}),
#"Added Prefix" = Table.TransformColumns(#"Expanded Custom", {{"Index", each "Course " & Text.From(_, "en-US"), type text}}),
#"Pivoted Column" = Table.Pivot(#"Added Prefix", List.Distinct(#"Added Prefix"[Index]), "Index", "SPRING SEMESTER PLACEMENT")
in
#"Pivoted Column"