Help using Base SAS procedures

Proc Tabulate: Exclude Column from Total

Reply
N/A
Posts: 0

Proc Tabulate: Exclude Column from Total

Hi, I'm using a fairly simple code to make a cross-tabulation table with grades 1 to 5 (pre-adjustment grades) down the side against grades 1 to 5 and 'Exclusions' (post-adjustment grades) across the top as follows:

proc tabulate data=work.current;
class before_adjustment after_adjustment /order=data;
classlev before_adjustment after_adjustment /s=[background=white];
table Before_Adjustment=' ' all={ label='Total' s=[background=vligb]},
N=' '*(After_Adjustment='Period 2 - Current' all={ label='Total' s=background=vligb]})*F=comma12./RTS=10.
box='Period 1 Previous' misstext=' ';
run;

The thing is, one of the columns on my table is called 'Exclusions' and I would like these figures excluded from the Total (or 'all') at the end of the table.
Does anyone know of any way of doing this?

Any help greatly appreciated!
PROC Star
Posts: 1,760

Re: Proc Tabulate: Exclude Column from Total

Posted in reply to deleted_user
You'll have to do your tweaked sum before hand I am afraid, as in:
[pre]proc summary data=sashelp.class nway noprint;
class AGE;
output out=CLASS;
run;
data TAB;
set CLASS;
if AGE <14 then TOT+_FREQ_;
label TOT= 'Total for <14';
run;
proc tabulate data=TAB;
var TOT _FREQ_;
class AGE;
table (AGE all='Total')*_FREQ_=''*sum=''*f=2.0 TOT*max='';
run;
N/A
Posts: 0

Re: Proc Tabulate: Exclude Column from Total

Ok, thanks for your help!
Ask a Question
Discussion stats
  • 2 replies
  • 124 views
  • 0 likes
  • 2 in conversation