<?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: Need help in Proc Tabulate in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4528#M1836</link>
    <description>Hi: &lt;BR /&gt;
  I'm in a class today, so really can't take a close look. Just a couple of idea. The comma (,) is not just punctuation. Right now, you are creating a 3 dimensional table -- one with page, row and column dimensions:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table NB all,   &amp;lt;---page&lt;BR /&gt;
Year*am*sum all*am*sum,  &amp;lt;--- row&lt;BR /&gt;
Year*fee*sum all*fee*sum &amp;lt;---col&lt;BR /&gt;
;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
I suspect that you are getting PROC TABULATE error messages that say something like that there are multiple analysis variables associated with a table cell and then you probably see a bunch of variables and asterisks listed.&lt;BR /&gt;
 &lt;BR /&gt;
Every place that you have a comma is an instruction to PROC TABULATE to go to a new dimension. If this is what you intend (a 3-dimensional report) -- then you'll need to move all your statistics to just 1 dimension or the other (move all the SUM into either the ROW or COL dimension).&lt;BR /&gt;
&lt;BR /&gt;
Otherwise, if this is NOT what you intend, you might consider reading the documentation about table operators or contacting Tech Support for more help.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Wed, 05 Sep 2007 15:52:17 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2007-09-05T15:52:17Z</dc:date>
    <item>
      <title>Need help in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4525#M1833</link>
      <description>Hi,&lt;BR /&gt;
   Using Proc Tabulate step, I am able to display the three variables listings:&lt;BR /&gt;
&lt;BR /&gt;
Say Row 1 that had some values in year1, year 2 etc&lt;BR /&gt;
&lt;BR /&gt;
Proc tabulate which I am using now displays Totals to the end for year 1, year 2 etc. I need the total for the rows across totalling in all the years. For Ex:&lt;BR /&gt;
&lt;BR /&gt;
                Year1    Year2   Year3       Total&lt;BR /&gt;
Row1          20          30        50            100&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
How to get this Total shown to the end in Row1?&lt;BR /&gt;
&lt;BR /&gt;
thanks,</description>
      <pubDate>Tue, 04 Sep 2007 19:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4525#M1833</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-04T19:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4526#M1834</link>
      <description>Hi:&lt;BR /&gt;
  The universal CLASS variable ALL is what you want to use. The placement of ALL on the TABLE statement (in the row dimension or the column dimension or in both dimensions) will determine where the summary line (the ALL line) appears.&lt;BR /&gt;
 &lt;BR /&gt;
Consider this example code (submit the code and review the results from each separate PROC TABULATE step):&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html file='c:\temp\tab_all.html' style=sasweb;&lt;BR /&gt;
  &lt;BR /&gt;
proc tabulate data=sashelp.prdsale f=comma12.;&lt;BR /&gt;
title 'Using All Both Dimensions';&lt;BR /&gt;
class year prodtype;&lt;BR /&gt;
var actual;&lt;BR /&gt;
table prodtype all,&lt;BR /&gt;
      year*actual*sum all*actual*sum;&lt;BR /&gt;
keylabel sum=' '&lt;BR /&gt;
         all='Total';&lt;BR /&gt;
run;&lt;BR /&gt;
     &lt;BR /&gt;
proc tabulate data=sashelp.prdsale f=comma12.;&lt;BR /&gt;
title 'Using All Row Dimension Only';&lt;BR /&gt;
class year prodtype;&lt;BR /&gt;
var actual;&lt;BR /&gt;
table prodtype all,&lt;BR /&gt;
      year*actual*sum;&lt;BR /&gt;
keylabel sum=' '&lt;BR /&gt;
         all='Total';&lt;BR /&gt;
run;&lt;BR /&gt;
     &lt;BR /&gt;
proc tabulate data=sashelp.prdsale f=comma12.;&lt;BR /&gt;
title 'Using All Column Dimension Only';&lt;BR /&gt;
class year prodtype;&lt;BR /&gt;
var actual;&lt;BR /&gt;
table prodtype,&lt;BR /&gt;
      year*actual*sum all*actual*sum;&lt;BR /&gt;
keylabel sum=' '&lt;BR /&gt;
         all='Total';&lt;BR /&gt;
run;&lt;BR /&gt;
     &lt;BR /&gt;
ods html close;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
This first TABLE statement has the ALL in both dimensions, row and column:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table prodtype &lt;B&gt;all,&lt;/B&gt;&lt;BR /&gt;
      year*actual*sum &lt;B&gt;all*actual*sum;&lt;/B&gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
PRODTYPE will go down the rows and the TOTAL of ALL PRODTYPES will be the last row. Then the SUM of the ACTUAL variable values will be under each YEAR in the column dimension. Finally, the SUM of all the YEAR values for ACTUAL (all*actual*sum) will be the last column to the right of the table.&lt;BR /&gt;
 &lt;BR /&gt;
Then for a TOTAL in just the ROW dimension (at the bottom of all the rows), I would have only:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table prodtype  &lt;B&gt;all,&lt;/B&gt;&lt;BR /&gt;
      year*actual*sum;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
And for a TOTAL in just the COLUMN dimension (to the right of all the years), I would have only:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table prodtype,&lt;BR /&gt;
      year*actual*sum &lt;B&gt;all*actual*sum;&lt;/B&gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
For more help using ALL with PROC TABULATE, you might consider contacting Tech Support.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 04 Sep 2007 21:28:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4526#M1834</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-04T21:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4527#M1835</link>
      <description>Thanks Cynthia,&lt;BR /&gt;
   That worked exactly what I needed.&lt;BR /&gt;
&lt;BR /&gt;
But I have two variables in VAR list. I was trying two different ways. But it throws error: " There are multiple analysis variables associated with a single table cell in the following nesting "&lt;BR /&gt;
&lt;BR /&gt;
proc tabulate data=all;&lt;BR /&gt;
 class  NB YEAR ;&lt;BR /&gt;
 VAR AM FEE&lt;BR /&gt;
;&lt;BR /&gt;
table NB all,&lt;BR /&gt;
      Year*am*sum all*am*sum,&lt;BR /&gt;
      &lt;B&gt;Year*fee*sum all*fee*sum&lt;/B&gt;&lt;BR /&gt;
;&lt;BR /&gt;
     ;&lt;BR /&gt;
	&lt;BR /&gt;
KEYLABEL  ALL	= 'TOTAL'&lt;BR /&gt;
	  SUM	= ' '&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
In the above Tabulate Procedure, highlighted one in bold for the fee is not working. I tried giving the 'Fee' variable in the same  " &lt;B&gt;Year*am*sum all*am*sum&lt;/B&gt; "&lt;BR /&gt;
&lt;BR /&gt;
But not working? How to get this working.&lt;BR /&gt;
&lt;BR /&gt;
thanks,</description>
      <pubDate>Wed, 05 Sep 2007 13:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4527#M1835</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-05T13:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4528#M1836</link>
      <description>Hi: &lt;BR /&gt;
  I'm in a class today, so really can't take a close look. Just a couple of idea. The comma (,) is not just punctuation. Right now, you are creating a 3 dimensional table -- one with page, row and column dimensions:&lt;BR /&gt;
[pre]&lt;BR /&gt;
table NB all,   &amp;lt;---page&lt;BR /&gt;
Year*am*sum all*am*sum,  &amp;lt;--- row&lt;BR /&gt;
Year*fee*sum all*fee*sum &amp;lt;---col&lt;BR /&gt;
;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
I suspect that you are getting PROC TABULATE error messages that say something like that there are multiple analysis variables associated with a table cell and then you probably see a bunch of variables and asterisks listed.&lt;BR /&gt;
 &lt;BR /&gt;
Every place that you have a comma is an instruction to PROC TABULATE to go to a new dimension. If this is what you intend (a 3-dimensional report) -- then you'll need to move all your statistics to just 1 dimension or the other (move all the SUM into either the ROW or COL dimension).&lt;BR /&gt;
&lt;BR /&gt;
Otherwise, if this is NOT what you intend, you might consider reading the documentation about table operators or contacting Tech Support for more help.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Wed, 05 Sep 2007 15:52:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4528#M1836</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-05T15:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in Proc Tabulate</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4529#M1837</link>
      <description>Cyndy,&lt;BR /&gt;
   That helped me.&lt;BR /&gt;
&lt;BR /&gt;
I replaces the earlier second variable in "Table" with below and report looks good.&lt;BR /&gt;
&lt;BR /&gt;
      (year all)*(am fee)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
thanks,</description>
      <pubDate>Wed, 05 Sep 2007 17:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Need-help-in-Proc-Tabulate/m-p/4529#M1837</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-05T17:04:47Z</dc:date>
    </item>
  </channel>
</rss>

