CCorrected the question and reposted in the correct forum.... how can I accomplish this.Thanks in advance family. Member. Category. Amount A. 1. Bio. 100 A. 1. Tab. 50 A. 2. Che. 75 A. 2. Bio. 100 A. 2. Lei. 50 A. 3. Bio. 150 A. 3. Pas. 200 B. Etc etc i have the above condition.my goal is to check for the following conditions and keep those records and the unqualified records into another dataset 1.want to keep a max of 2 records for Bio, Che,tab categories but, can keep upto 3 records for Pas, upto 4 for lei. 2.the total should not exceed 500/ family 3. The last category should get partial credit to equal 500/family desired output: family. Member. Category. Amount A. 1. Bio. 100 A. 1. Tab. 50 A. 2 Che. 75 A. 2. Bio. 100 A. 2. Lei. 50 A. 3. Pas. 125 lost bio for member 3 as bio count > 2 the last category got partial credit 125 instead of 200 (500-(100+50+75+100+50) to make it 500/ family.
... View more