Hi,
I'd like to trace deposits using the last in, first out (LIFO) approach. Essentially, I need to deplete the deposit amount with any subsequent withdrawals unless a new deposit comes in, and I'd deplete the new deposit first before returning back to the older deposits. I attached a sample dataset along with an example. Please note that I do not need the format of workflow output to mimic the example.
Please let me know if I can clarify anything. Thank you in advance for your help with this matter.