BookmarkSubscribeRSS Feed
Data_Analyst
Calcite | Level 5

I have a date set similar to the one below. Clients come with issue(s) that need to be addressed. They periodically come back to check on the issue(s) resolution status. All issues are being followed until a resolution is found. The date a client reports a new issue is captured as  "First Visit". Ideally, when the client returns, all issues would be resolved, however this is s not always the case. Each unresolved issue is discussed at every visit, however the client may come many times  before we have a solution. Once the issue is resolved the date is captured in the variable "Resolution". 

ClientIssueFirst VisitResolutionNumber of Visits
DebIssue125-Apr-2207-Jun-221
DebIssue225-Apr-2207-Jun-221
DebIssue325-Apr-2207-Jun-221
DebIssue407-Jul-2215-Aug-222
DebIssue507-Jul-2220-Oct-223
DebIssue615-Aug-2220-Oct-22 
DebIssue715-Aug-22  
DebIssue820-Oct-22  
DebIssue920-Oct-22  
JackIssue114-Mar-2222-Sep-22 
JackIssue214-Mar-2206-Jul-22 
JackIssue314-Mar-2206-Jul-22 
JackIssue414-Mar-22  
JackIssue514-Mar-2206-Jul-22 
JackIssue605-Jul-2222-Sep-22 
JackIssue705-Jul-2222-Sep-22 
JackIssue805-Jul-2222-Sep-22 
JackIssue905-Jul-2222-Sep-22 
JackIssue1005-Jul-2222-Sep-22 
JackIssue1121-Sep-22  

I need to calculate how many times (number of visits)  each client came back to troubleshoot to the same issue:

- Resolved  issues: the number of visits.

- Unresolved Issues: the number of visits between the last visit on record and the first visit.

 

My actual data set includes hundreds of clients and thousands of issues.

 

Any help would be appreciated.

3 REPLIES 3
Reeza
Super User
Please show what the input data looks like. This looks like the output data, and I would expect to say a date of visit for example in the input data.
Data_Analyst
Calcite | Level 5

Hi, this is the input data. I have an Excel spreadsheet which is the result from a database query. I am planning to import the spreadsheet in sas and calculate the number of visits.  I hope this helps.

Data_Analyst
Calcite | Level 5

This is a tricky problem to solve because it requires manipulation of individual variables/observations within the data set as oppose to working with the entire set.

 

I am happy to report that managed to calculate how many times each customer came back before their issues were resolved.

 

I followed the approach described in this publication:

 

https://support.sas.com/resources/papers/proceedings/proceedings/sugi26/p093-26.pdf

 

I took some time to make it work but worked!

 

I am sharing, just in case somebody else has a similar problem.

 

Cheers!

 

 

 

 

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!

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