Forum Discussion
Dirk_Kuypers
6 years agoFrequent Visitor
running total
Hello,
I am trying to create a running total for my PPT (Potential Production Time) for different production lines for eacht month.
There are 5 lines and for each line a PPT for each month.
I want a CumPPT for each line.
| Line | Year | Month | PPT | CumPPT |
| 1 | 2019 | 1 | 452 | 452 |
| 1 | 2019 | 2 | 502 | 954 |
| 1 | 2019 | 3 | 345 | 1299 |
| 2 | 2019 | 1 | 78 | 78 |
| 2 | 2019 | 2 | 98 | 176 |
| 2 | 2019 | 3 | 101 | 277 |
| 3 | 2019 | 1 | 345 | 345 |
| 3 | 2019 | 2 | 554 | 899 |
| 3 | 2019 | 3 | 234 | 1133 |
I created a column CumPPT but I cannot get the calculation.
Hi Dirk_Kuypers ,
Maybe you can do like this:
Total_running = CALCULATE( SUM(Sheet1[PPT]), FILTER( Sheet1, Sheet1[Month] <= EARLIER(Sheet1[Month]) && Sheet1[Line] = EARLIER(Sheet1[Line]) ) )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-lionel-msftCommunity Support
Hi Dirk_Kuypers ,
Maybe you can do like this:
Total_running = CALCULATE( SUM(Sheet1[PPT]), FILTER( Sheet1, Sheet1[Month] <= EARLIER(Sheet1[Month]) && Sheet1[Line] = EARLIER(Sheet1[Line]) ) )Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.