- let
- 源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
- 更改的类型 = Table.TransformColumnTypes(源,{{"货类类别序号", Int64.Type}, {"货种", type text}, {"操作过程(工序)", type text}, {"费率", type number}}),
- 分组的行 = Table.Group(更改的类型, {"货类类别序号", "货种", "费率"}, {{"工序", each Text.Combine([#"操作过程(工序)"]," "), type nullable text}}),
- 分组的行1 = Table.Group(分组的行, {"费率", "工序"}, {{"种类", each Text.Combine([货种],"; "), type nullable text}, {"序号", each List.Average([货类类别序号]), type nullable number}}),
- 重排序的列 = Table.ReorderColumns(分组的行1,{"序号", "种类", "工序", "费率"})
- in
- 重排序的列
复制代码
PQ结果无法实现合并单元格,请参考附件 |