hi all, policy amount date 1 50 1 1 20 3 1 30 7 1 60 9 2 120 12 2 80 14 2 100 18 i want to find the dates on which policy are paying their premium. for ex if the premium amount for policy 1 is 80 so on 7th date his first premium is fully collected plus 20 rs extra.on 9th date his second premium is fully recieved..20 remaining and he paid 60rs..so i want only rows where he finally paid premium..like for policy 1 i want only 3rd and 4th row.i have 1 cr policies. please help on this
I think what you want to do is use the sum statement but your question isn't very clear. If this doesn't give you the desired out put try attaching what it is you are looking for:
data have;
infile cards dsd;
input policy$ amount date;
cards;
1,50,1
1,20,3
1,30,7
1,60,9
2,120,12
2,80,14
2,100,18
;
data want;
set have;
sum_pay + amount;
run;
The 2025 SAS Hackathon has begun!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.