let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"PO No"}, {{"Data", each _, type table [PO No=nullable number, Desc=nullable text]}}),
#"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Data],"Index",1,1)),
#"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Desc", "Index"}, {"Custom.Desc", "Custom.Index"}),
#"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"Data"}),
#"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Removed Columns", {{"Custom.Index", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Removed Columns", {{"Custom.Index", type text}}, "en-US")[Custom.Index]), "Custom.Index", "Custom.Desc")
in
#"Pivoted Column"
Pivot your data in Power Query. Here is the Mcode for those steps. File attached for your review.
Code:let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], #"Grouped Rows" = Table.Group(Source, {"PO No"}, {{"Data", each _, type table [PO No=nullable number, Desc=nullable text]}}), #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Data],"Index",1,1)), #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"Desc", "Index"}, {"Custom.Desc", "Custom.Index"}), #"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"Data"}), #"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Removed Columns", {{"Custom.Index", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Removed Columns", {{"Custom.Index", type text}}, "en-US")[Custom.Index]), "Custom.Index", "Custom.Desc") in #"Pivoted Column"
= UNIQUE(PONo)
=TRANSPOSE(FILTER(Desc, PONo=@DistinctPO#))
Hi Can u Upload Excle File Please365 also has solutions. For example, calculating distinct PO nos. 'DistinctPO's using the first formula, will allow the rows of the output table to be calculated one-by-one using the second formula.
Code:= UNIQUE(PONo) =TRANSPOSE(FILTER(Desc, PONo=@DistinctPO#))
Thank U sir, this is also serve purpose, but i dont know how to use those Formulas can u help me??Let me know it you have trouble with the formulae.