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

 

0 Likes
2 REPLIES 2
Astounding
Opal | Level 21
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;
0 Likes
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...

0 Likes
JUST RELEASED

SAS Viya with pay-as-you-go pricing.

Deploy software automatically at the click of a button on the Microsoft Azure Marketplace.

Learn more

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.

Recommended by SAS
These recommendations are generated using AI from SAS. For personalized recommendations, sign in with your SAS profile.
Discussion stats
  • 2 replies
  • 79 views
  • 0 likes
  • 2 in conversation