<?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: Good Tabulate method for Character Missing Values in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Good-Tabulate-method-for-Character-Missing-Values/m-p/303773#M60815</link>
    <description>&lt;P&gt;Switch N and __character_ in your table statement?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Oct 2016 13:23:48 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-10-11T13:23:48Z</dc:date>
    <item>
      <title>Good Tabulate method for Character Missing Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Good-Tabulate-method-for-Character-Missing-Values/m-p/303760#M60813</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;I'm new with this of SAS, and I have the titanic quest of improve the quality of a giant bussiness database. Why I introduce myself like this? Well, this is my first post, thanks to the community's paper&amp;nbsp;I have been able to resolve the problem that cross in my way until&amp;nbsp;now, and... I think it's not gonna be the last.&lt;/P&gt;&lt;P&gt;This time I need to do the next thing:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset&amp;nbsp;like this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5243i0744F84813A75DCD/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Captura.PNG" title="Captura.PNG" /&gt;&lt;/P&gt;&lt;P&gt;My work here is to make a table with the ammount of missing values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the number is easy, with a proc tabulate is enough, but... with the characters... well...&lt;/P&gt;&lt;P&gt;I tried with this Cody's code (From Cody's Data Cleaning Technique):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC FORMAT;
	VALUE $MISSCH ' ' = 'Missing' 
		    OTHER = 'NonMissing';
RUN;

PROC TABULATE DATA=WORK MISSING;
	CLASS _character_;
	TABLE _character_, N;
	FORMAT _character_ $MISSCH.;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And I obtain a&amp;nbsp;table like this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5244iD4EE266F7A41DE1F/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Captur1a.PNG" title="Captur1a.PNG" /&gt;&lt;/P&gt;&lt;P&gt;But, I need this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5245i2FDAB3EFB19F1FCD/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Captura.PNG" title="Captura.PNG" /&gt;&lt;/P&gt;&lt;P&gt;Someone can give me a tip?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your attention, everybody.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 12:29:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Good-Tabulate-method-for-Character-Missing-Values/m-p/303760#M60813</guid>
      <dc:creator>Feragon42</dc:creator>
      <dc:date>2016-10-11T12:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Good Tabulate method for Character Missing Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Good-Tabulate-method-for-Character-Missing-Values/m-p/303767#M60814</link>
      <description>&lt;PRE&gt;data have;&lt;BR /&gt;input var1 $ var2;&lt;BR /&gt;cards;&lt;BR /&gt;some 1&lt;BR /&gt;thing 2&lt;BR /&gt;. 3&lt;BR /&gt;here .&lt;BR /&gt;. 4&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc sql;&lt;BR /&gt;select 'var1' as var label='#' length=32,&lt;BR /&gt; nmiss(var1) as missing,&lt;BR /&gt; n(var1) as non_miss&lt;BR /&gt; from have&lt;BR /&gt;union &lt;BR /&gt;select 'var2' as var ,&lt;BR /&gt; nmiss(var2) as missing,&lt;BR /&gt; n(var2) as non_miss&lt;BR /&gt; from have;&lt;BR /&gt; &lt;BR /&gt;quit;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Oct 2016 13:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Good-Tabulate-method-for-Character-Missing-Values/m-p/303767#M60814</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-10-11T13:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Good Tabulate method for Character Missing Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Good-Tabulate-method-for-Character-Missing-Values/m-p/303773#M60815</link>
      <description>&lt;P&gt;Switch N and __character_ in your table statement?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 13:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Good-Tabulate-method-for-Character-Missing-Values/m-p/303773#M60815</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-10-11T13:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Good Tabulate method for Character Missing Values</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Good-Tabulate-method-for-Character-Missing-Values/m-p/303775#M60816</link>
      <description>&lt;P&gt;Can you not manipulate the output of a freq procedure to get your result:&lt;/P&gt;
&lt;PRE&gt;data have;&lt;BR /&gt; input var1 $ var2;&lt;BR /&gt;cards;&lt;BR /&gt;some 1&lt;BR /&gt;thing 2&lt;BR /&gt;. 3&lt;BR /&gt;here .&lt;BR /&gt;. 4&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc freq data=have;&lt;BR /&gt; ods output onewayfreqs=onewayfreqs;&lt;BR /&gt; tables _all_;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data onewayfreqs;&lt;BR /&gt; set onewayfreqs (keep=table cumfrequency);&lt;BR /&gt; by table;&lt;BR /&gt; if last.table then output;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt; create table WANT as&lt;BR /&gt; select A.TABLE,&lt;BR /&gt; B.NOBS - A.CUMFREQUENCY as MISSING,&lt;BR /&gt; A.CUMFREQUENCY as NONMISSING&lt;BR /&gt; from ONEWAYFREQS A&lt;BR /&gt; left join (select * from SASHELP.VTABLE where LIBNAME="WORK" and MEMNAME="HAVE") B&lt;BR /&gt; on 1=1;&lt;BR /&gt;quit;

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 13:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Good-Tabulate-method-for-Character-Missing-Values/m-p/303775#M60816</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-10-11T13:29:53Z</dc:date>
    </item>
  </channel>
</rss>

