Hi:
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.
Consider this example code (submit the code and review the results from each separate PROC TABULATE step):
[pre]
ods html file='c:\temp\tab_all.html' style=sasweb;
proc tabulate data=sashelp.prdsale f=comma12.;
title 'Using All Both Dimensions';
class year prodtype;
var actual;
table prodtype all,
year*actual*sum all*actual*sum;
keylabel sum=' '
all='Total';
run;
proc tabulate data=sashelp.prdsale f=comma12.;
title 'Using All Row Dimension Only';
class year prodtype;
var actual;
table prodtype all,
year*actual*sum;
keylabel sum=' '
all='Total';
run;
proc tabulate data=sashelp.prdsale f=comma12.;
title 'Using All Column Dimension Only';
class year prodtype;
var actual;
table prodtype,
year*actual*sum all*actual*sum;
keylabel sum=' '
all='Total';
run;
ods html close;
[/pre]
This first TABLE statement has the ALL in both dimensions, row and column:
[pre]
table prodtype all,
year*actual*sum all*actual*sum;
[/pre]
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.
Then for a TOTAL in just the ROW dimension (at the bottom of all the rows), I would have only:
[pre]
table prodtype all,
year*actual*sum;
[/pre]
And for a TOTAL in just the COLUMN dimension (to the right of all the years), I would have only:
[pre]
table prodtype,
year*actual*sum all*actual*sum;
[/pre]
For more help using ALL with PROC TABULATE, you might consider contacting Tech Support.
cynthia