Forum Discussion
Jon Cooke
Mar 15, 2018Copper Contributor
Help with vlookup
Hi
I'm not sure how to explain what i'm trying to achieve or the correct terminology so google has not been my friend . So I need to take date from Tab one that is in rows and pivot some infor...
SergeiBaklan
Mar 15, 2018Diamond Contributor
Hi Jon,
Okay, I'll try. However, the easiest way is to use Power Query (aka Get&Transform in 2016) to receive result in few clicks. The only point is to convert the range in Tab1 into the table.
Query done with User Interface only is
let
Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Product.............", type text}, {"Column1", type text}, {"Description...................", type text}, {"Sin/Inn", Int64.Type}, {"Sin/Outer", Int64.Type}, {"Weight", type number}, {"Sin/Pallet", Int64.Type}, {"Volume", type number}, {"OUTERS LENGTH", Int64.Type}, {"Column2", type number}, {"OUTERS WIDTH", Int64.Type}, {"Column3", type number}, {"OUTERS HEIGHT", Int64.Type}, {"height", type number}, {"INNERS LENGTH", Int64.Type}, {"INNERS WIDTH", Int64.Type}, {"INNERS HEIGHT", Int64.Type}, {"OUTER TI", Int64.Type}, {"OUTER HI", Int64.Type}, {"INNER TI", Int64.Type}, {"INNER HI", Int64.Type}}),
#"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([#"Product............."] <> null)),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Product.............", "Weight", "Column2", "Column3", "height"}),
#"Split Column by Delimiter" = Table.SplitColumn(#"Removed Other Columns", "Product.............", Splitter.SplitTextByDelimiter("_", QuoteStyle.Csv), {"Product..............1", "Product..............2"}),
#"Removed Columns" = Table.RemoveColumns(#"Split Column by Delimiter",{"Product..............1"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Columns",{{"Weight", "CartonWeight"}, {"Column2", "CartonLength"}, {"Column3", "CartonWidght"}, {"height", "CartonHeight"}, {"Product..............2", "Product"}}),
#"Reordered Columns" = Table.ReorderColumns(#"Renamed Columns",{"Product", "CartonLength", "CartonWidght", "CartonHeight", "CartonWeight"}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Reordered Columns", {"Product"}, "Attribute", "Value"),
#"Renamed Columns1" = Table.RenameColumns(#"Unpivoted Other Columns",{{"Attribute", "CustomFieldID"}, {"Value", "CustomValue"}})
in
#"Renamed Columns1"
and in attached.
Jon Cooke
Mar 15, 2018Copper Contributor
Wow , that is amazing , Now all i have to do is learn how you do it but . Thank you so much . I will now work backwards and learn from this