Power Query – Transposing multiple rows into singular columns

I am a complete newbie to Power Query. I am trying to take the following data source and convert the field into aggregated headers with a singular value of the code.

enter image description here

I’ve tried utilizing group by, transposing and merging duplicated data sources but I’m not able to get the desired result. I’m expecting something like below:

enter image description here

>Solution :

Click select the Field column, then transform .. pivot column…

use Value as Values column and in advanced options choose Dont Aggregate

enter image description here

sample code

let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Pivoted Column" = Table.Pivot(Source, List.Distinct(Source[Field]), "Field", "Value")
in #"Pivoted Column"

Leave a Reply