BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
pauliet987
Calcite | Level 5

Hello,

     I am trying something I have never done before, and I can't get it right. Essentially, I have a bunch of Zipcodes associated with a particular Week_Start date. For example,

 

What I have 

Zipcode    Week_Start

04662.       02/27/2018

14738.       02/27/2018

04662.        02/27/2018

14738.        03/06/2018

04662.        03/06/2018

04662.        03/13/2018

14738.        03/20/2018

 

What I want to do is sum the total observations of Zipcodes for a particular Week_Start. For example,

 

What I want:

Total_ZipCodes Week_Start 

3                         02/27/2018

2.                         03/06/2018

1                          03/13/2018

1                          03/20/2018

 

Thank you so much for any help you are able to give! 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26
proc freq data=have;
    tables week_start;
run;

 

If you want the results in a SAS data set, then this should do it:

 

proc freq data=have;
    tables week_start/out=counts;
run;
--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26
proc freq data=have;
    tables week_start;
run;

 

If you want the results in a SAS data set, then this should do it:

 

proc freq data=have;
    tables week_start/out=counts;
run;
--
Paige Miller