BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Shivi82
Quartz | Level 8

Dear Team,

I am working on a collections assignment for one of my clientele.

 

The requirement is that they need to analyze how's the pay pattern of customers and who are a pain area.

 

For this i have started with creating day level drill down of customers based on payment days. so customers make payment from a period of 10 days to over 1000 days.

so i used a case statement and created various segments with respective population.

 

The challenge i have now is that since this data is for past 1 year hence there are instances where a customer (SFX code) might have made a payment in 10 days whereas the same customer would have made the payment in 50 or 100 or even more days.

Hence i need to know % payments made within x number of days.

 

I could have created a new var as total where total = category + category 2 (first 2 lowest categories)/ total = x% and then i could have filtered however as these categories are calculated columns hence i cannot use this as well.

Request you to please suggest an alternate.

 

Attached some data for examination.

 

Regards, Shivi

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

If you have data that looks something like

 

Identification (could be multiple variables) Days

 

Then you could create a custom format for days of interest. Possibly something like

proc format;

value mydays

0 - 5 = '0 to  5 days'

6 - 10 = '5 to 10 days'

11-20 = '11 to 20 days'

21 - high= '21+ days'

;

then use that format in one of the report procedures such as:

 

proc tabulate data= have;

   class Id;

   class Days;

   format days mydays.;

   table id * days, pctn ;

run;

View solution in original post

4 REPLIES 4
Reeza
Super User
Why can't you filter? Are you using SAS BASE or SAS VA?
Shivi82
Quartz | Level 8

I am using base SAS 9.3

Reeza
Super User
For default analysis, or Churn, you can look at survival methods as well.
ballardw
Super User

If you have data that looks something like

 

Identification (could be multiple variables) Days

 

Then you could create a custom format for days of interest. Possibly something like

proc format;

value mydays

0 - 5 = '0 to  5 days'

6 - 10 = '5 to 10 days'

11-20 = '11 to 20 days'

21 - high= '21+ days'

;

then use that format in one of the report procedures such as:

 

proc tabulate data= have;

   class Id;

   class Days;

   format days mydays.;

   table id * days, pctn ;

run;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 1045 views
  • 0 likes
  • 3 in conversation