BookmarkSubscribeRSS Feed
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

I need count monthly disenrollment  for 2022.

 

Data table :  

 

MEMBER_ID ENROLLMENT  DISENROLLEMNT 
A0001 2/1/2021 3/1/2021
A0001 5/29/2021 6/24/2021
A0001 7/1/2021 8/1/2021
B0001 6/3/2021 8/2/2021
B0001 10/1/2021 11/1/2021

 

How do I have the monthly disenroll , and count by member_ID: as following 

 

1. Member_ID, Disenroll_Month_Flg 

A0001             202104

A0001             202107

A0001             202209

B0001             202109

B0001             202112

 

2. Summary: disenroll by month 

month      count: 

202104      1

202107      1

202109      2

202112      1

 

3. Summery disenroll by member:

Member     Count 

A0001         3

B0001         2

 

2 REPLIES 2
Astounding
PROC Star
You don't need to change the data. You just need PROC FREQ to apply a format. For example:

proc freq data=have;
format enrollment yrmon7.;
tables member_id enrollment;
run;
JHE
Obsidian | Level 7 JHE
Obsidian | Level 7

thank you. But if I want count 2021 disenrollment, the rest of the month dose not  enrolled should be counted as disenroll, hwo could I do that   

 

similar to this ..but it is disenroll. How to ? 

https://communities.sas.com/t5/SAS-Programming/Finding-the-continous-and-discontinous-months-enrollm...

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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