那个“借货合并+-”看到讨厌,把+-删掉了.....
let
源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content],
更改的类型 = Table.TransformColumnTypes(源,{{"企业", type text}, {"年", Int64.Type}, {"月份", Int64.Type}, {"凭证字号", type text}, {"摘要", type text}, {"科目代码", type number}, {"币别", type text}, {"借方", type number}, {"贷方", type number}, {"制单", type text}, {"借贷合并", type number}}),
已添加索引 = Table.AddIndexColumn(更改的类型, "索引", 1, 1),
fx=(x,y,z)=> List.Sum(Table.SelectRows(已添加索引, each [企业] = x and [科目代码] = y and [索引] <= z)[借贷合并]),
res=Table.AddColumn(已添加索引,"sum",each fx([企业],[科目代码],[索引])),
删除的列 = Table.RemoveColumns(res,{"索引"})
in
删除的列 |