BookmarkSubscribeRSS Feed
rajan_reliance
Calcite | Level 5

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

1 REPLY 1
Steelers_In_DC
Barite | Level 11

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;

hackathon24-white-horiz.png

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.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1249 views
  • 0 likes
  • 2 in conversation