答案 0 :(得分:3)
您可以使用选项All Rows对ACODE进行分组,然后在嵌套表中添加一行,删除原始的ACODE列并使用嵌套表展开该列。
let
Source = Input,
#"Grouped Rows" = Table.Group(Source, {"ACODE"}, {{"AllData", each _, type table}}),
#"Inserted Row" = Table.TransformColumns(#"Grouped Rows",{{"AllData", each Table.InsertRows(_,0,{[ACODE = null, Keyword = _[ACODE]{0}]})}}),
#"Removed Columns" = Table.RemoveColumns(#"Inserted Row",{"ACODE"}),
#"Expanded AllData" = Table.ExpandTableColumn(#"Removed Columns", "AllData", {"ACODE", "Keyword"}, {"ACODE", "Keyword"})
in
#"Expanded AllData"