<?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 to Output Category with No Count in Proc Tabulate in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236242#M14713</link>
    <description>look at PRELOADFMT.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.lexjansen.com/nesug/nesug11/cc/cc29.pdf" target="_blank"&gt;http://www.lexjansen.com/nesug/nesug11/cc/cc29.pdf&lt;/A&gt;</description>
    <pubDate>Tue, 24 Nov 2015 18:55:08 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-11-24T18:55:08Z</dc:date>
    <item>
      <title>How to Output Category with No Count in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236238#M14712</link>
      <description>&lt;P&gt;I am trying to make a percentage table for a survey using proc tabulate. All questions have 8 choices. However, since not all choices will be chosen in the survey for each questions, SAS will skip those choices. Is there away to have SAS to output it as 0 instead of skipping it?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please see the sample code below:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data test;&lt;BR /&gt;input participant Question_A Question_B;&lt;BR /&gt;datalines;&lt;BR /&gt;1 4 2&lt;BR /&gt;2 3 0&lt;BR /&gt;3 6 5&lt;BR /&gt;4 1 0&lt;BR /&gt;5 0 4&lt;BR /&gt;6 6 4&lt;BR /&gt;7 7 7&lt;BR /&gt;8 1 0&lt;BR /&gt;9 4 2&lt;BR /&gt;10 1 4&lt;BR /&gt;11 3 2&lt;BR /&gt;12 1 4&lt;BR /&gt;13 3 0&lt;BR /&gt;14 3 4&lt;BR /&gt;15 3 3&lt;BR /&gt;16 1 7&lt;BR /&gt;17 2 3&lt;BR /&gt;18 5 4&lt;BR /&gt;19 6 0&lt;BR /&gt;20 5 6&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc format;&lt;BR /&gt;value testfmt&lt;BR /&gt;/* 0='0'*/&lt;BR /&gt;/* 1='Strongly Disagree'*/&lt;BR /&gt;/* 2='Disagree'*/&lt;BR /&gt;/* 3='Slightly Disagree'*/&lt;BR /&gt;/* 4='No opinion (Neutral)'*/&lt;BR /&gt;/* 5='Slightly Agree'*/&lt;BR /&gt;/* 6='Agree (Mostly Agree)'*/&lt;BR /&gt;/* 7='Strongly Agree';*/&lt;BR /&gt; 0='0'&lt;BR /&gt; 1='1'&lt;BR /&gt; 2='2'&lt;BR /&gt; 3='3'&lt;BR /&gt; 4='4'&lt;BR /&gt; 5='5'&lt;BR /&gt; 6='6'&lt;BR /&gt; 7='7';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc tabulate data = test;&lt;BR /&gt;class &lt;BR /&gt; Question_A&lt;BR /&gt; Question_B&lt;BR /&gt;;&lt;BR /&gt;table (&lt;BR /&gt; Question_A&lt;BR /&gt; Question_B&lt;BR /&gt;),pctn&amp;lt;&lt;BR /&gt; Question_A&lt;BR /&gt; Question_B&lt;BR /&gt;&amp;gt;="%"*f=5.0;&lt;BR /&gt;format&lt;BR /&gt; Question_A&lt;BR /&gt; Question_B&lt;BR /&gt;testfmt.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, none of the particpant reponsed for choice 1 for question B. Thus choice 1 does not show up in the table from proc tabulate. However, is there a way to have SAS output choice 1 as 0 percent?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 18:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236238#M14712</guid>
      <dc:creator>jackchanheikit</dc:creator>
      <dc:date>2015-11-24T18:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Category with No Count in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236242#M14713</link>
      <description>look at PRELOADFMT.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.lexjansen.com/nesug/nesug11/cc/cc29.pdf" target="_blank"&gt;http://www.lexjansen.com/nesug/nesug11/cc/cc29.pdf&lt;/A&gt;</description>
      <pubDate>Tue, 24 Nov 2015 18:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236242#M14713</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-24T18:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Category with No Count in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236265#M14714</link>
      <description>I tried for last one hr and could not fine the answer ..can some one help ..</description>
      <pubDate>Tue, 24 Nov 2015 19:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236265#M14714</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-24T19:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Category with No Count in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236268#M14715</link>
      <description>&lt;P&gt;PRELOADFMT on class statement&lt;/P&gt;
&lt;P&gt;and PRINTMISS on table statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Method 3 in the paper above.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data = test ;
class Question_A Question_B / preloadfmt;
table (Question_A Question_B), pctn&amp;lt;Question_A Question_B&amp;gt;="%"*f=5.0/printmiss;
format Question_A Question_B testfmt.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Nov 2015 20:04:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236268#M14715</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-24T20:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Category with No Count in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236269#M14716</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/59783"&gt;@pearsoninst&lt;/a&gt; I'm confused, you're not the original poster?</description>
      <pubDate>Tue, 24 Nov 2015 20:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236269#M14716</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-24T20:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Category with No Count in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236285#M14717</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza﻿&lt;/a&gt;I am the original poster and thank you for your solution. I think the other poerson is probably looking for the same thing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 22:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236285#M14717</guid>
      <dc:creator>jackchanheikit</dc:creator>
      <dc:date>2015-11-24T22:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Output Category with No Count in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236288#M14718</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza﻿&lt;/a&gt;&amp;nbsp;Once again, thank you very much for your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 22:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-Output-Category-with-No-Count-in-Proc-Tabulate/m-p/236288#M14718</guid>
      <dc:creator>jackchanheikit</dc:creator>
      <dc:date>2015-11-24T22:42:57Z</dc:date>
    </item>
  </channel>
</rss>

