BookmarkSubscribeRSS Feed
Prateek1
Obsidian | Level 7

hi,

 

what should be the code ?

In the SMB usage data create another column to identify churners by using Product_ID as key variable (check if the key variable is unique ID in this case ).The list of churners is given in the 'Churners and labels' along with churn month .Use left join or Right Join?

1 REPLY 1
JohnSAScom
Quartz | Level 8

Hi Prateek1,

 

Looking at your data on the "Churners" sheet, I see that for each unique PRODUCT_ID there is only one unique value of churn_month, is that correct? To shorten your list and get a list of unique PRODUCT_IDs with their associated churn_month values,

 

proc sql;

     select distinct(PRODUCT_ID), churn_month from Churners;

quit;

 

John

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 781 views
  • 0 likes
  • 2 in conversation