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)

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]

Want to read more?

Check out the full article on the original site

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