BookmarkSubscribeRSS Feed
JT99
Obsidian | Level 7
Hello!
My data looks like this:
Acct x1 x2 ...x24 date1 date2 ... date24
qaz 12 15 ...45 1jan19 1feb19 ... 1dec20
wsx 60 41 10aug18 10sep18

Basically, I have monthly payments x1, x2 up to x24 that a customer needs to pay on date1,date2 up to date24. Some accounts will have up to x12 and date12(12 months and not 24).
How do I get the sum of all payments(x1,x2,..,) where the corresponding date is less than a particular date for each account?
Any advice will be appreciated
2 REPLIES 2
Patrick
Opal | Level 21

Transpose your data into a narrow format with columns Acct Amount Date and everything else becomes simple.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 773 views
  • 2 likes
  • 3 in conversation