BookmarkSubscribeRSS Feed
adhi2823
Calcite | Level 5

Thanks Paige for your code.

Reeza: What do you want me to explain? I apologize, being an international student, could not meet your standards in explaining things. However, let me try my best.

I have my data under two separate columns:

Column 1 (Month)               Column 2 (Customer ID)
201007                                   x1...xn

.                                               x1...xn                                          

.

.

.

.

.

201310                                   x1....xn

I want my result in following format:

Column 1 (Month)               Column 2 (New ID)               Column 3 (ID that exited)

New ID Definition: ID that never appear in last 12 months but appear in current month.

Exit ID Definition: ID that appeared 12 months before but never appeared for next 12 months (including current month).

I hope I explained my problem. If you think I am still unable to explain things, please let me know and I am happy to try as much as I can. Thanks a lot for your help.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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