1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

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

Our take

Hi everyone! I'm working on tracking cost changes for items using a cumulative sum in my spreadsheet. My challenge is ensuring that once an Order date exceeds a specific Price change date, the cumulative sum resets to zero, starting a new calculation. I believe utilizing Power Query to filter out Order date lines before the Price change date might simplify the process and eliminate the need for zeroing the cumulative sum.

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.

submitted by /u/Exciting-Demand-3814
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Tagged with

#Excel alternatives for data analysis#natural language processing for spreadsheets#generative AI for data analysis#rows.com#Excel compatibility#financial modeling with spreadsheets#Excel alternatives#cloud-based spreadsheet applications#cumulative sum#Order date#Price change date#Power Query#cost changes#conditional formatting#percentage#new sum#cumulative sum zeroing#TRUE/FALSE#track costs#posted table