Trusted Members
February 13, 2021
December 5, 2016
Thanks Jessica you great help !
But what we want the layout from the Pivot table should transpose as below
ie rows wise presentation, to show the Vendor and related customer codes grouping as below from the Pivot table
Vendor Code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code | Customer code |
H3PM | 12349PC | 12349SC | 96099JHO | 96099L | 96099VFB | ||||||||||
HA0D | 12349PC | 96407G | 96946G | 97131G | SOHB | SUN-S | YAGID | ||||||||
HA54 | 12349BL | 12349YB | 12349YBA | 96058G | 96250G | 96440G | 96728G | 96799AVC | 96799G | 96799S | 96883G | 96946G | 97131G | ACE | ANTEX 1 |
HA56 | 96799S | 96900G | 97131G | HFJHK | HFX | ||||||||||
HA66 | 96058G | 96536A | 96728G | 96799G | 96946G | HITH | INFO | ITC | LITE | MDHK | MDHKG | NSECK | SANE | SANEC | TOMHK |
Trusted Members
October 18, 2018
Trusted Members
October 18, 2018
Look at the attached. All done with Power Query
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Vendor Code"}, {{"Data", each _, type table [Vendor Code=text, Customer Code=text]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Data],"Index",1,1)),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Data"}),
#"Expanded Custom" = Table.ExpandTableColumn(#"Removed Columns", "Custom", {"Customer Code", "Index"}, {"Custom.Customer Code", "Custom.Index"}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Expanded Custom", {{"Custom.Index", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Expanded Custom", {{"Custom.Index", type text}}, "en-US")[Custom.Index]), "Custom.Index", "Custom.Customer Code")
in
#"Pivoted Column"
1 Guest(s)