<?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 proc tabulate sum totals in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-tabulate-sum-totals/m-p/257540#M18033</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please assist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looking for a way to generate a report as per attached spreadsheet. I want to add total employee + total third party.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find a sample.xlsx file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Thokozani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Mar 2016 09:35:59 GMT</pubDate>
    <dc:creator>Thokozani</dc:creator>
    <dc:date>2016-03-18T09:35:59Z</dc:date>
    <item>
      <title>proc tabulate sum totals</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-tabulate-sum-totals/m-p/257540#M18033</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please assist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looking for a way to generate a report as per attached spreadsheet. I want to add total employee + total third party.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find a sample.xlsx file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Thokozani&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 09:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-tabulate-sum-totals/m-p/257540#M18033</guid>
      <dc:creator>Thokozani</dc:creator>
      <dc:date>2016-03-18T09:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate sum totals</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-tabulate-sum-totals/m-p/257546#M18034</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you would like accurate answers, post test data in the form of a datastep so we have something to work with. &amp;nbsp;Personally I tend to code these use SQL:&lt;/P&gt;
&lt;PRE&gt;proc sql;
  create table WANT as
  select  COUNTRY,
          sum(PERM),
          sum(CONTRACT),
          sum(TEMP),
          count(EMPLOYEES),
          count(AGENCY),
          count(CONSULTANTS),
          count(AGENCY)+count(CONSULTANTS)
  from    HAVE
  group by COUNTRY
  union all
  select  "Region Total",
          sum(PERM),
          sum(CONTRACT),
          sum(TEMP),
          count(EMPLOYEES),
          count(AGENCY),
          count(CONSULTANTS),
          count(AGENCY)+count(CONSULTANTS)
  from    HAVE;
quit;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Mar 2016 09:56:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-tabulate-sum-totals/m-p/257546#M18034</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-18T09:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate sum totals</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-tabulate-sum-totals/m-p/257555#M18035</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please find my proc tabulate code.I want to add another column that will*&lt;BR /&gt;sum=Employee Total+Total Third Party*&lt;BR /&gt;&lt;BR /&gt;PROC TABULATE&lt;BR /&gt;DATA=REPORT.SEA_OPCO FORMAT=10. ;&lt;BR /&gt;VAR total_employee2 total_employee3 x;&lt;BR /&gt;CLASS employee_person_type3 / DESCENDING MISSING;&lt;BR /&gt;CLASS Operation employee_person_type2/ MISSING s=[background=yellow];&lt;BR /&gt;class dummy / MISSING s=[background=black];&lt;BR /&gt;TABLE&lt;BR /&gt;/* ROW Statement */&lt;BR /&gt;Operation = '' all = ' Region Total',&lt;BR /&gt;/* COLUMN Statement */&lt;BR /&gt;Employee_Person_Type3='' *(total_employee3=' ' * Sum={LABEL=" "} )&lt;BR /&gt;all = ' Employee Total' *(total_employee3=' ' * Sum={LABEL=" "} )&lt;BR /&gt;dummy=' '*x=''*sum=''*{style={background=black }}&lt;BR /&gt;Employee_Person_Type2='' *(total_employee2=' ' * Sum={LABEL=" "} )&lt;BR /&gt;all = ' Total Third Party' *(total_employee2=' ' * Sum={LABEL=" "}&lt;BR /&gt;)&lt;BR /&gt;/ misstext='0' box=[label="OpCo" style=[background=yellow]];&lt;BR /&gt;keyword all /s=[background=yellow];&lt;BR /&gt;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Fri, 18 Mar 2016 10:33:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-tabulate-sum-totals/m-p/257555#M18035</guid>
      <dc:creator>Thokozani</dc:creator>
      <dc:date>2016-03-18T10:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate sum totals</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-tabulate-sum-totals/m-p/257565#M18036</link>
      <description>&lt;P&gt;If I understand correctly you can't calculate new variables in proc tabulate. You can use proc report for calculations or a data step.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 11:07:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/proc-tabulate-sum-totals/m-p/257565#M18036</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-18T11:07:26Z</dc:date>
    </item>
  </channel>
</rss>

