Hello All, This is little bit tricky question to generate commission value. I have one input dataset, I am stuck in this logic. Could you Please help me solve it. Note: Please read carefully the Rules as per priority. Summary of Problem: Here in below Input data set,to generate commision value , cust wise, every row have different customer like(cust1,cust2,Cust3....till Cust12) column data and their commision amount, base amount,...etc. but here I want data as per commision logic (commission1,commission2......till commission12). Please follow the logic as per Rule priority. Rule 1 - We have to take all cust1,cust2,cust3 ...up to cust12 where cust should not be any null value or 0. Ex- in First row, in all cust column have data, so we should consider. in second row, cust1 doesn't have any data, So it should ignore and if any cust have some value , first on priorty it should check all commision column value, if you see output table in commission column, all commision value is appearing corresponding to cust. Note- if some where we are getting commission 0 or null value, then we shouldn't take that customer,commission. Rule 2- if we are getting commission value, then in output table , base column should store base value to corresponding to commision value from Base column. Ex- Cust1 (A) has commission 20, and base is 100 is showing in output. Common Rule 3 :- To generate base, amt, loan column in output table, we should always take corresponding value to every cust commission. if it is zero any where for corresponding to commision then it should write 0. in output table Row 3 logic is little bit different. Once each cust 1,cust2, cust3 ...cust 12 , commision value will be processed, after finishing every row(before going to second row). it should check 1 column of table (Trans_amt). If trans_amt is null or 0, then it should ignore,( value should not be loaded in to commision column.) else Trans_amt is having some value like 500,600 then it should be loaded in to commission column, and rest 4 columns should be empty (cust,base,amt,loan). If you have any doubts related to logic, please let me know, I will clear it. Thanks Ritesh
... View more