<?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: help: proc tabulate in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/help-proc-tabulate/m-p/92240#M26258</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the SUM= statistic to create the label to span multiple analysis variables.&amp;nbsp; I have included an example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc tabulate data=sashelp.class;&lt;/P&gt;&lt;P&gt;class age sex;&lt;/P&gt;&lt;P&gt;var height weight;&lt;/P&gt;&lt;P&gt;table age, sum='total expenditure'*(height weight)&lt;/P&gt;&lt;P&gt; sex=' '*(height weight)*sum=' ';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2013 14:48:37 GMT</pubDate>
    <dc:creator>Kathryn_SAS</dc:creator>
    <dc:date>2013-01-31T14:48:37Z</dc:date>
    <item>
      <title>help: proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-proc-tabulate/m-p/92239#M26257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to generate a table with proc tabulate but now i'm having some problems to insert "dummy" rowtitles.&amp;nbsp; &lt;/P&gt;&lt;P&gt;My table looks like the following example:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="proc_tabulate.PNG" class="jive-image-thumbnail jive-image" height="75" src="https://communities.sas.com/legacyfs/online/3052_proc_tabulate.PNG" width="1174" /&gt;&lt;/P&gt;&lt;P&gt;Created by the following code:&lt;/P&gt;&lt;P&gt;******* &lt;/P&gt;&lt;P&gt;PROC TABULATE&lt;BR /&gt;DATA= mydata &lt;BR /&gt; ;&lt;BR /&gt; &lt;BR /&gt; VAR SUM_A_KOST_J SUM_VORHABEN SUM_TOTAL_VORHABEN SUM_VORHABEN_OEFFENTLICH SUM_TOTAL_AUSGABEN SUM_AUSGABEN_OEFFENTLICH;&lt;BR /&gt; CLASS PERH_J / ORDER=UNFORMATTED MISSING;&lt;BR /&gt; CLASS A_TYPARB / ORDER=UNFORMATTED MISSING;&lt;BR /&gt; TABLE /* Zeilendimension */&lt;BR /&gt;PERH_J={LABEL=''},&lt;BR /&gt;/* Spaltendimension */&lt;BR /&gt;SUM_TOTAL_AUSGABEN*&lt;BR /&gt;&amp;nbsp; Sum={LABEL=''}&lt;BR /&gt;SUM_TOTAL_VORHABEN*&lt;BR /&gt;&amp;nbsp; Sum={LABEL=''} &lt;BR /&gt;A_TYPARB={LABEL=''}*(&lt;BR /&gt;&amp;nbsp; SUM_A_KOST_J*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum={LABEL=''} &lt;BR /&gt;&amp;nbsp; SUM_VORHABEN*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum={LABEL=''}) &lt;BR /&gt;SUM_AUSGABEN_OEFFENTLICH*&lt;BR /&gt;&amp;nbsp; Sum={LABEL=''} &lt;BR /&gt;SUM_VORHABEN_OEFFENTLICH*&lt;BR /&gt;&amp;nbsp; Sum={LABEL=''}&amp;nbsp;&amp;nbsp; ;&lt;BR /&gt; ;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;********&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i would like to insert a cell above the first two titles (SUM_TOTAL_AUSGABEN SUM_TOTAL_VORHABEN) at the same height as the numbers 4 and 5. Furthermore the cell should be combined like number 4 or number 5.&lt;/P&gt;&lt;P&gt;The same should be done for the last two rows.&lt;/P&gt;&lt;P&gt;it should look like the following:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="proc_tabulate.PNG" class="jive-image-thumbnail jive-image" height="87" src="https://communities.sas.com/legacyfs/online/3053_proc_tabulate.PNG" width="1294" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 14:04:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-proc-tabulate/m-p/92239#M26257</guid>
      <dc:creator>meatmuffin</dc:creator>
      <dc:date>2013-01-31T14:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: help: proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-proc-tabulate/m-p/92240#M26258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the SUM= statistic to create the label to span multiple analysis variables.&amp;nbsp; I have included an example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc tabulate data=sashelp.class;&lt;/P&gt;&lt;P&gt;class age sex;&lt;/P&gt;&lt;P&gt;var height weight;&lt;/P&gt;&lt;P&gt;table age, sum='total expenditure'*(height weight)&lt;/P&gt;&lt;P&gt; sex=' '*(height weight)*sum=' ';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 14:48:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-proc-tabulate/m-p/92240#M26258</guid>
      <dc:creator>Kathryn_SAS</dc:creator>
      <dc:date>2013-01-31T14:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: help: proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-proc-tabulate/m-p/92241#M26259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Try running the code below and see if that helps you understand how TABULATE builds headers. You can only attach a header in TABULATE to a CLASS, VAR or STATISTIC name. In PROC REPORT, you can put arbitrary spanning headers. Consider the code below.&lt;/P&gt;&lt;P&gt;cynthia&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\header_tab.html';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=sashelp.class;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; where age ge 14;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; class age sex;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var height weight;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table age,&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; height*sum="Under" weight*sum="Under" sex*n='under'&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; /box='1) Under';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table age,&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; sum="over"*height sum="over"*weight n='spanned'*sex&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; /box='2) Over';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table age,&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; sum="spanned"*(height weight) n=' '*sex&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; /box='3) Spanned';&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;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc report data=sashelp.class nowd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; title '4) PROC REPORT Spanning Headers';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; column ('Top Header' age ("More Over" sum,(height weight) sex));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define age / group;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define height / analysis;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define weight / analysis;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sum / 'Over';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; define sex / across;&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>Thu, 31 Jan 2013 14:58:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-proc-tabulate/m-p/92241#M26259</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2013-01-31T14:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: help: proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/help-proc-tabulate/m-p/92242#M26260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank to both of you very much for the help.&lt;/P&gt;&lt;P&gt;With the different views it was very easy to understand proc tabulate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 15:10:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/help-proc-tabulate/m-p/92242#M26260</guid>
      <dc:creator>meatmuffin</dc:creator>
      <dc:date>2013-01-31T15:10:15Z</dc:date>
    </item>
  </channel>
</rss>

