- let
Source = Excel.CurrentWorkbook(){[Name="表2"]}[Content],
Custom1 = Table.AddColumn(Source,"合计",each List.Sum(List.Skip(Record.FieldValues(_),5))),
Custom2 = Table.ReorderColumns(Custom1,[a=Table.ColumnNames(Source),b=List.FirstN(a,5)&{"合计"}&List.Skip(a,5)][b])
in
Custom2
复制代码 |