Hi all,
Suppose i have a dataset as such:

What I want to do is for each row with a negative amount, I want to add that amount to a row of the same product with a positive amount, and identify any negative amount that has been unallocated. The output could be something like this:

How could I achieve this? Initially, i thought that a multi row formula tool might work, but seems like i have to both look at above and below rows. Attached is a starter workflow file.