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;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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