Hi I have a business problem and I am stuck and not able to drive the solution. Anyone able to help or provide some hints would be appreciated. Consider the hypothetical example below: Shop Cust_bal1 Cust_bal2 Cust_bal3 Payments 1 30 40 50 20 1 30 40 50 25 1 30 40 50 30 1 30 40 50 40 1 30 40 50 10 1 30 40 50 15 In a particular shop, A consumer balance is segmented into three Bal1 bal2 and bal3. Bal1 being the highest priority, Bal2 and Bal3. This is retained across the observation and now the consider the payments are made. The Balances has to be moved in such a way that bal1 should be given highest priority then bal2 and so on. Ideally, the output should be like: Shop Cust_bal1 Cust_bal2 Cust_bal3 Payments cal_bal1 Cal_bal2 Cal_bal3 Payments_1 1 30 40 50 20 10 40 50 20 1 30 40 50 25 0 25 50 10 1 30 40 50 30 0 0 45 25 1 30 40 50 40 0 0 5 40 1 30 40 50 5 0 0 0 5 1 30 40 50 0 0 0 0 0 In the end, I would only consider the Payments which were contributed for Bal1 and Bal3 and created a separate column payments_1. I have manually created the example and output in Excel because I could not apply the logic in SAS. Thank you so much for help. Thanks
... View more