<?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: How would I Count Missing Values for all Columns in a Table BY another Column in the Table in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/376966#M24498</link>
    <description>&lt;P&gt;Oh progress! &amp;nbsp;I added the statement:&amp;nbsp;FORMAT CHNL_SRC_CD $CHARw.;&lt;/P&gt;&lt;P&gt;Now I get the data by source code! &amp;nbsp;I realize what I was doing with the first format statement. &amp;nbsp;I'll look at the link to the other reference Reeza provided to see if I can get a better table result.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2017 12:31:33 GMT</pubDate>
    <dc:creator>shpetke</dc:creator>
    <dc:date>2017-07-18T12:31:33Z</dc:date>
    <item>
      <title>How would I Count Missing Values for all Columns in a Table BY another Column in the Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/376771#M24480</link>
      <description>&lt;P&gt;I am a very new SAS EG version 6.1 user with limited training. &amp;nbsp;I searched and found a solution that kind of meets my needs, but not 100% which is located here: &amp;nbsp;&lt;STRONG&gt;&lt;A href="http://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable.html&lt;/A&gt; &amp;nbsp;&lt;/STRONG&gt;A lot of it is over my head, but a section seems to work (see code below) with one exception.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FORMAT;
	value $missfmt ' '='Missing' other='Not Missing';
	value  missfmt  . ='Missing' other='Not Missing';
RUN;

PROC FREQ DATA=CCW.INTGRD_INPA;
FORMAT _CHAR_ $missfmt.;
TABLES _CHAR_ / missing missprint nocum nopercent;
FORMAT _NUMERIC_ missfmt.;
TABLES _NUMERIC_ / missing missprint nocum nopercent;	
;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My results for one column looks like below, but I need to see the columns BY another field, so CLIENT_ID by SRC_SYS for Missing/Not Missing and export the results to Excel. &amp;nbsp;How would I accomplish this? &amp;nbsp;Thanks! &amp;nbsp;Sue&lt;/P&gt;&lt;DIV&gt;CLIENT_ID CLIENT_ID Frequency &lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Missing&lt;/TD&gt;&lt;TD&gt;249897&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Not Missing&lt;/TD&gt;&lt;TD&gt;2928702&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 21:46:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/376771#M24480</guid>
      <dc:creator>shpetke</dc:creator>
      <dc:date>2017-07-17T21:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: How would I Count Missing Values for all Columns in a Table BY another Column in the Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/376775#M24481</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FREQ DATA=CCW.INTGRD_INPA;
BY CLIENT_ID;

FORMAT _CHAR_ $missfmt.;
TABLES _CHAR_ / missing missprint nocum nopercent;
FORMAT _NUMERIC_ missfmt.;
TABLES _NUMERIC_ / missing missprint nocum nopercent;	
;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Have you tried adding a BY statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This isnt' a macro but you can also try modifying my code here to see if helps you get a single table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gist.github.com/statgeek/e0903d269d4a71316a4e" target="_blank"&gt;https://gist.github.com/statgeek/e0903d269d4a71316a4e&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/114129"&gt;@shpetke&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I am a very new SAS EG version 6.1 user with limited training. &amp;nbsp;I searched and found a solution that kind of meets my needs, but not 100% which is located here: &amp;nbsp;&lt;STRONG&gt;&lt;A href="http://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2011/09/19/count-the-number-of-missing-values-for-each-variable.html&lt;/A&gt; &amp;nbsp;&lt;/STRONG&gt;A lot of it is over my head, but a section seems to work (see code below) with one exception.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FORMAT;
	value $missfmt ' '='Missing' other='Not Missing';
	value  missfmt  . ='Missing' other='Not Missing';
RUN;

PROC FREQ DATA=CCW.INTGRD_INPA;
FORMAT _CHAR_ $missfmt.;
TABLES _CHAR_ / missing missprint nocum nopercent;
FORMAT _NUMERIC_ missfmt.;
TABLES _NUMERIC_ / missing missprint nocum nopercent;	
;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My results for one column looks like below, but I need to see the columns BY another field, so CLIENT_ID by SRC_SYS for Missing/Not Missing and export the results to Excel. &amp;nbsp;How would I accomplish this? &amp;nbsp;Thanks! &amp;nbsp;Sue&lt;/P&gt;
&lt;DIV&gt;CLIENT_ID CLIENT_ID Frequency
&lt;TABLE cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;Missing&lt;/TD&gt;
&lt;TD&gt;249897&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;Not Missing&lt;/TD&gt;
&lt;TD&gt;2928702&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2017 21:57:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/376775#M24481</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-17T21:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: How would I Count Missing Values for all Columns in a Table BY another Column in the Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/376958#M24496</link>
      <description>&lt;P&gt;I did try the BY statement for CHNL_SRC_CD but it is not the right result. &amp;nbsp;None of the CHNL_SRC_CD's are missing. &amp;nbsp;The result came out like below. &amp;nbsp;I want to see the result for each column in the table by CHNL_SRC_CD. &amp;nbsp;&lt;/P&gt;&lt;TABLE cellspacing="10 px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="proctitle"&gt;&lt;SPAN class="proctitle"&gt;The&amp;nbsp;FREQ&amp;nbsp;Procedure&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P class="byline"&gt;&lt;SPAN class="byline"&gt;CHNL_SRC_CD=Not&amp;nbsp;Missing&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;ACCT_SUBTY_CD ACCT_SUBTY_CD Frequency &lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Missing&lt;/TD&gt;&lt;TD&gt;1727253&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Not Missing&lt;/TD&gt;&lt;TD&gt;1452962&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;ACCT_SUBTY_2_CD ACCT_SUBTY_2_CD Frequency &lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Missing&lt;/TD&gt;&lt;TD&gt;250696&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Not Missing&lt;/TD&gt;&lt;TD&gt;2929519&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;ACCT_TY_CD ACCT_TY_CD Frequency &lt;TABLE cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Missing&lt;/TD&gt;&lt;TD&gt;1727253&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Not Missing&lt;/TD&gt;&lt;TD&gt;1452962&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to see something like this where SourceSysn is the value in field CHNL_SRC_CD.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Missing&lt;/TD&gt;&lt;TD&gt;Not Missing&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ACCT_SUBTY_CD&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys4&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ACCT_SUBTY_2_CD&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys4&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ACCT_TY_CD&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SourceSys4&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 18 Jul 2017 12:13:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/376958#M24496</guid>
      <dc:creator>shpetke</dc:creator>
      <dc:date>2017-07-18T12:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: How would I Count Missing Values for all Columns in a Table BY another Column in the Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/376966#M24498</link>
      <description>&lt;P&gt;Oh progress! &amp;nbsp;I added the statement:&amp;nbsp;FORMAT CHNL_SRC_CD $CHARw.;&lt;/P&gt;&lt;P&gt;Now I get the data by source code! &amp;nbsp;I realize what I was doing with the first format statement. &amp;nbsp;I'll look at the link to the other reference Reeza provided to see if I can get a better table result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 12:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/376966#M24498</guid>
      <dc:creator>shpetke</dc:creator>
      <dc:date>2017-07-18T12:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: How would I Count Missing Values for all Columns in a Table BY another Column in the Table</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/377023#M24501</link>
      <description>&lt;P&gt;I was able to modify the code in the link Reeza provided, so I have what I am looking for. &amp;nbsp;I can't say that I understand all the code, but it's working. &amp;nbsp;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2017 14:30:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-would-I-Count-Missing-Values-for-all-Columns-in-a-Table-BY/m-p/377023#M24501</guid>
      <dc:creator>shpetke</dc:creator>
      <dc:date>2017-07-18T14:30:35Z</dc:date>
    </item>
  </channel>
</rss>

