BookmarkSubscribeRSS Feed
altijani
Quartz | Level 8

Hi Community,

 

I have a data that shows the total collections for a specific customer, who experienced a reopening of their order after it was closed. I need from that data to obtain the collections for the reporting month. Here is what I have:

IDDateStatusCollection dateAmount owedever collected
123429-Feb-16Open.82.440
123431-Mar-16Open.82.440
123430-Apr-16Open.82.440
123431-May-16Open.82.440
123430-Jun-16Open.82.440
123431-Jul-16Closed20-Jul-1682.4482.44
123431-May-18reopened20-Jul-1682.44

82.44

 

And here is what I need (the last column):

IDDateStatusCollection dateAmount owedever collectedthis month collection
123429-Feb-16Open.82.4400
123431-Mar-16Open.82.4400
123430-Apr-16Open.82.4400
123431-May-16Open.82.4400
123430-Jun-16Open.82.4400
123431-Jul-16Closed20-Jul-1682.4482.4482.44
123431-May-18reopened20-Jul-1682.4482.440

 

many thanks,

Altijani

 

1 REPLY 1
Reeza
Super User

I suspect this example will not generalize to your actual data. Can you provide a more robust example?

 

If it does generalize, then you can use something like:

 

if put(collection_date, yymm6.) = put(date, yymm6.) then this_month = ever_collected;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 894 views
  • 0 likes
  • 2 in conversation