u/Exciting-Demand-3814

▲ 7 r/excel

Cumulative sum based on date (return 0 if goes over)

Hi, everyone

I am trying to build a column with following condition:

I have changes between costs for items, which I want to track using cumulative sum.

Where I am stuck:

Once the Order date of the line goes over a certain Price change date, I want the cumulative sum to go to 0, starting a new sum. But I am not sure how to do that.

I think it would be easier to have Power Query to remove Order date lines before the Price change date, which, I guess, removes the need for the zeroing of the cumulative sum. And then I can do cumulative sum in a posted table from Power query to remove the need to do it in a weird way through PQ.

Final aim is to catch when the cumulative sum after the Price change goes over a certain %, which I have separately. Easily done by conditional formatting or simple TRUE/FALSE, which I have in starting form now already.

reddit.com
u/Exciting-Demand-3814 — 2 days ago