<?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: Regading Proc Tabulate in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Regading-Proc-Tabulate/m-p/155144#M40752</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, your TABULATE statement is missing a table operator. So, this specification: Women(n colpctn) is incorrect. Usually, one would expect to see Women*(n colpctn); Take a look at the output from this example, I added the ALL to show you the COLPCTN was working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\example_tab.html';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=sashelp.prdsale;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;class product&amp;nbsp; year region&amp;nbsp;&amp;nbsp; prodtype ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;tables&amp;nbsp; (product *&amp;nbsp; year * region) all,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prodtype *(n colpctn) /printmiss misstext=' ' ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Sep 2014 13:36:13 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2014-09-23T13:36:13Z</dc:date>
    <item>
      <title>Regading Proc Tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Regading-Proc-Tabulate/m-p/155142#M40750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Friends,&lt;/P&gt;&lt;P&gt;Here i need results like village wise and year wise total and percentage. but i am trying with the below code but it not works. Please help me in this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc tabulate data=paper.Role_gender_in_;&lt;/P&gt;&lt;P&gt;class Village&amp;nbsp; year Activity_Name&amp;nbsp; men Women both;&lt;/P&gt;&lt;P&gt;tables&amp;nbsp; (Village *&amp;nbsp; year * Activity_Name),&amp;nbsp; Women (n colpctn) /printmiss misstext=' ' ;&lt;/P&gt;&lt;P&gt;format Women AWM_.;&lt;/P&gt;&lt;P&gt;run; bula&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 05:19:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Regading-Proc-Tabulate/m-p/155142#M40750</guid>
      <dc:creator>anilgvdbm</dc:creator>
      <dc:date>2014-09-23T05:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regading Proc Tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Regading-Proc-Tabulate/m-p/155143#M40751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TBH I don't use proc tabulate, so maybe someone who does can help you there.&amp;nbsp; For this type of thing I would just go directly to an output dataset of (and note you have not provided test data or required output so guessing):&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table WANT as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select&amp;nbsp; AGE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SEX,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COUNT(SEX) as TOT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (COUNT(SEX) / (select COUNT(*) from SASHELP.CLASS)) * 100 as PCENT&lt;/P&gt;&lt;P&gt;&amp;nbsp; from&amp;nbsp;&amp;nbsp;&amp;nbsp; SASHELP.CLASS&lt;/P&gt;&lt;P&gt;&amp;nbsp; group by AGE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SEX;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use proc report to generate some nice output.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 09:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Regading-Proc-Tabulate/m-p/155143#M40751</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-09-23T09:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Regading Proc Tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Regading-Proc-Tabulate/m-p/155144#M40752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, your TABULATE statement is missing a table operator. So, this specification: Women(n colpctn) is incorrect. Usually, one would expect to see Women*(n colpctn); Take a look at the output from this example, I added the ALL to show you the COLPCTN was working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\example_tab.html';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=sashelp.prdsale;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;class product&amp;nbsp; year region&amp;nbsp;&amp;nbsp; prodtype ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;tables&amp;nbsp; (product *&amp;nbsp; year * region) all,&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; prodtype *(n colpctn) /printmiss misstext=' ' ;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 13:36:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Regading-Proc-Tabulate/m-p/155144#M40752</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-09-23T13:36:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regading Proc Tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Regading-Proc-Tabulate/m-p/155145#M40753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Cynthia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose in your example i need subtotal and percentage for product wise how to go with that code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you explain to me please that is what exactly i was looking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 03:52:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Regading-Proc-Tabulate/m-p/155145#M40753</guid>
      <dc:creator>anilgvdbm</dc:creator>
      <dc:date>2014-09-24T03:52:34Z</dc:date>
    </item>
  </channel>
</rss>

