<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PROC means - Include Zero Counts in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486865#M126740</link>
    <description>&lt;P&gt;Checking Related topics to your post can be useful. Does this help?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/PROC-FREQ-Include-Zero-Counts/m-p/325505#M62255" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/PROC-FREQ-Include-Zero-Counts/m-p/325505#M62255&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Aug 2018 22:39:00 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2018-08-14T22:39:00Z</dc:date>
    <item>
      <title>PROC means - Include Zero Counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486864#M126739</link>
      <description>&lt;P&gt;i have proc means procedure as below. I want to modify it to show count of 0 values for each column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is there any other proc that i could use that will provide me below for selected numeric columns in my dataset?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;MEAN STD MIN MAX N NMISS&lt;/SPAN&gt; 0count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.staff;
   infile datalines dlm='#';
   input Name &amp;amp; $16. IdNumber $ Salary 
         Site $ HireDate date7.;
   format hiredate date7.;
   datalines;
Capalleti, Jimmy#  2355# 21163# BR1# 30JAN09
Chen, Len#         5889# 20976# BR1# 18JUN06
Davis, Brad#       3878# 19571# BR2# 20MAR84
Leung, Brenda#     4409# 34321# BR2# 18SEP94
Martinez, Maria#   3985# 0# US2# 10JAN93
Orfali, Philip#    0740# 50092# US2# 16FEB03
Patel, Mary#       2398# 35182# BR3# 02FEB90
Smith, Robert#     5162# 40100# BR5# 15APR66
Sorrell, Joseph#   4421# 38760# US1# 19JUN11
Zook, Carla#       7385# 22988# BR3# 18DEC10
run;

PROC MEANS DATA=WORK.staff
	FW=12
	PRINTALLTYPES
	CHARTYPE
	VARDEF=DF 	
		MEAN 
		STD 
		MIN 
		MAX 
		N 
		NMISS	;
	VAR Salary HireDate;

RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 22:29:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486864#M126739</guid>
      <dc:creator>nnnwf</dc:creator>
      <dc:date>2018-08-14T22:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC means - Include Zero Counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486865#M126740</link>
      <description>&lt;P&gt;Checking Related topics to your post can be useful. Does this help?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/PROC-FREQ-Include-Zero-Counts/m-p/325505#M62255" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/PROC-FREQ-Include-Zero-Counts/m-p/325505#M62255&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 22:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486865#M126740</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-08-14T22:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: PROC means - Include Zero Counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486867#M126742</link>
      <description>&lt;P&gt;how could i include other statistics, like mean median mode max min etc along with count of 0s? i would like to have a single output table similar to proc freq&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 22:48:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486867#M126742</guid>
      <dc:creator>nnnwf</dc:creator>
      <dc:date>2018-08-14T22:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: PROC means - Include Zero Counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486869#M126743</link>
      <description>&lt;P&gt;The simplest way would be to work with your data, creating a new variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if salary = 0 then _0_count = 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now the N statistic for _0_count gives you a count of the zeros.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 23:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486869#M126743</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-08-14T23:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC means - Include Zero Counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486870#M126744</link>
      <description>&lt;P&gt;but that would mean that i have to create dummy column for each column in my data. I have 100+ columns and i cannot create dummy column for each&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 23:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486870#M126744</guid>
      <dc:creator>nnnwf</dc:creator>
      <dc:date>2018-08-14T23:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: PROC means - Include Zero Counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486874#M126748</link>
      <description>&lt;P&gt;See if this gives you something usable.&lt;/P&gt;
&lt;PRE&gt;proc format library=work;
value iszero
0='Yes'
other='No'
;
run;

proc tabulate data=have;
   class _numeric_/missing;
   format _numeric_ iszero.;
   tables _numeric_ ,
          n
   ;
run;&lt;/PRE&gt;
&lt;P&gt;replace HAVE with the name of your data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2018 23:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-means-Include-Zero-Counts/m-p/486874#M126748</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-14T23:20:46Z</dc:date>
    </item>
  </channel>
</rss>

