Hi!
I have a use case where I'm generating inventory aging, and I need to do some complex multi row manipulation I cannot figure out.
What I'm trying to do is to split values from quantity into new rows every time there is a new delivery. So let's take a practical example from the screenshot below.

At 2005-06-05 I had 113 quantity in stock, and 2005-06-06 I got a resupply and now I have 189 in stock. What I want to do here is to take the delta between those two days into a new row so I can continue calculating the stock age for that specific stock quantity. In this case it would be 76. I then want every single minus in quantity going forward to substract from the 113 before starting to substract from the new 76.
Any smart people that can help me here?