在 Power 查询中对列进行分组和连接

问题描述 投票:0回答:1

我想在从第一个到第二个的强力查询中获得这个结果,同时连接和分组列。

谢谢您的帮助。

enter image description here

powerquery
1个回答
0
投票

尝试

let  Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {"Item", "Description"}, {
    {"Qty", each List.Sum([Qty]), type number},
    {"lots", each Text.Combine(Table.AddColumn(_, "Custom", each Text.From([Lot])&"("&Text.From([Qty])&")")[Custom],","), type text}
})
in  #"Grouped Rows"
© www.soinside.com 2019 - 2024. All rights reserved.