BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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!
2 REPLIES 2
ChrisNZ
Tourmaline | Level 20
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;
deleted_user
Not applicable
Ok, thanks for your help!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1459 views
  • 0 likes
  • 2 in conversation