|
- let
- Source = Excel.CurrentWorkbook(){[Name="表2"]}[Content],
- Custom1 = Table.PromoteHeaders(Table.Transpose(Table.CombineColumns(Table.FillDown(Table.Transpose(Source),{"Column1"}),{"Column1","Column2"},each Text.Combine(_,"-"),"x"))),
- Custom2 = Table.AddColumn(Custom1,"合计-计划",each List.Sum(List.Transform({2..Table.ColumnCount(Custom1)-1},(x)=>if Text.Contains(Table.ColumnNames(Custom1){x},"计划") then Record.FieldValues(_){x} else 0))),
- Custom3 = Table.AddColumn(Custom2,"合计-实际",each List.Sum(List.Transform({2..Table.ColumnCount(Custom1)-1},(x)=>if Text.Contains(Table.ColumnNames(Custom2){x},"实际") then Record.FieldValues(_){x} else 0)))
- in
- Custom3
复制代码 |
评分
-
1
查看全部评分
-
|