I don't come up with the same numbers that you do but here is a solution, there's probably a neater way to do this with proc summary but I'm not too experienced with it: Data have; infile cards dsd; length County_FIPS $5. Survey_Question $11.; input County_FIPS$ Survey_Question$; cards; 22001,1 (yes) 22001,1 (yes) 22001,2 (no) 22001,1 (yes) 22003,9 (refused) 22003,1 (yes) 22003,1 (yes) 22005,1 (yes) 22005,2 (no) ; proc sql; create table want as select county_fips,count(survey_question)/counts as percent_no from (select county_fips,survey_question,count(survey_question) as counts from have group by county_fips) where survey_question contains 'no' group by county_fips; If you want to count refused you can change 'contains 'no'' to 'not contains 'yes'' but it's 33%, not 67%. Hope this helps. Edit: proc sql; create table want as select county_fips,count(survey_question)/counts as Percent_No format = percent. from (select county_fips,survey_question,count(survey_question) as counts from have group by county_fips) where survey_question not contains 'yes' group by county_fips; Message was edited by: Mark Johnson
... View more