Cumulating row data over last 12 months in powerquery

∥☆過路亽.° 提交于 2019-12-08 23:11:32

I covered a very similar scenario to this in my demo file: Power Query demo - Running Total.xlsx

You can download it from my OneDrive and review the steps:

https://1drv.ms/f/s!AGLFDsG7h6JPgw4

Basically you add an Index, Group By the "group columns" (in your scenario D1 and D2) and create an "All Rows" Aggregate column. Then you Copy the "All Rows" column, Expand both "All Rows" columns, Filter and finally Group By and Sum to create the Running Total.

The only bit of code is the Added column to produce a true/false column for the filter, e.g.

[Index] >= [#"All Rows - Copy.Index"]
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!