<?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 Subtotal on a proc tabulate in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Subtotal-on-a-proc-tabulate/m-p/385751#M65766</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to run a proc tab that totals each category.&amp;nbsp; I guess it's just better to output different proc tabs to different excel sheets?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, there should be sales types under leader and supporter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-08-04_15-17-55.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/14337i0E17D335C9700F40/image-size/large?v=v2&amp;amp;px=999" role="button" title="2017-08-04_15-17-55.jpg" alt="2017-08-04_15-17-55.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Aug 2017 19:25:09 GMT</pubDate>
    <dc:creator>MarkusAurelius</dc:creator>
    <dc:date>2017-08-04T19:25:09Z</dc:date>
    <item>
      <title>Subtotal on a proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Subtotal-on-a-proc-tabulate/m-p/385751#M65766</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to run a proc tab that totals each category.&amp;nbsp; I guess it's just better to output different proc tabs to different excel sheets?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, there should be sales types under leader and supporter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2017-08-04_15-17-55.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/14337i0E17D335C9700F40/image-size/large?v=v2&amp;amp;px=999" role="button" title="2017-08-04_15-17-55.jpg" alt="2017-08-04_15-17-55.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 19:25:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Subtotal-on-a-proc-tabulate/m-p/385751#M65766</guid>
      <dc:creator>MarkusAurelius</dc:creator>
      <dc:date>2017-08-04T19:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal on a proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Subtotal-on-a-proc-tabulate/m-p/385758#M65769</link>
      <description>&lt;P&gt;Without variable names or anything it is a bit awkward to provide much detail. The ALL instruction will create sub totals.&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex age;
   var height ;
   tables sex *( age All='total'),
          height*sum;
run;&lt;/PRE&gt;
&lt;P&gt;Notice that the ALL with with the subgroup Age to get a total within the values of Sex.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If also want a grand total:&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex age;
   var height ;
   tables (sex all='Grand Total') *( age All='total'),
          height*sum;
run;&lt;/PRE&gt;
&lt;P&gt;In Tabulate the All instruction may only be used with Class variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach uses multilabel formats but this may get you started.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for output to different sheets, that is your choice and may depend on the method you use to get it into Excel.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 19:49:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Subtotal-on-a-proc-tabulate/m-p/385758#M65769</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-08-04T19:49:38Z</dc:date>
    </item>
  </channel>
</rss>

