Hello All, I have this dataset: Case Amount Need1 Need2 Need3 1 30 20 15 10 2 12 20 15 10 3 10 20 15 10 4 8 20 15 10 5 5 20 15 10 6 2 20 15 10 And need your help to obtain Cumulative_subtotal and Cumulative_subtotal_id fields: Case Amount Need1 Need2 Need3 Cumulative_subtotal Cumulative_subtotal_id 1 30 20 15 10 30 1 2 12 20 15 10 12 2 3 10 20 15 10 22 2 4 8 20 15 10 8 3 5 5 20 15 10 13 3 6 2 20 15 10 2 0 Create multiple cumulative subtotals of amount that cover/hedge Needi. Cumulative_subtotal=30>=Need1=20 end of id=1; Cumulative_subtotal=22>=Need2=15 end of id=2; Cumulative_subtotal=13>=Need3=10 end of id=3; Cumulative_subtotal_id=0 means not needed. Thank you for your help,
... View more