Proc tabulate data=exc_cnt order= data format=10. S=[cellwidth=150];
Class prog_ctgy CODEDESC;
Var gr_amt cnt_cd;
Table CODEDESC=' ' all={label='Total' S=[background = lightblue cellwidth=160]} *[STYLE=[Font_Weight=BOLD]],
prog_ctgy*(cnt_cd=''*sum='Exceptions Units' gr_amt=''*sum='Exceptions$' /** colpctn*/ )
all={label='Grand Total' S=[background = lightblue]} *[STYLE=[Font_Weight=BOLD]] *cnt_cd =' '*sum=' ' / box='Exception Codes';
TITLE 'Summary';
footnote1 &rptdate;
run;
This code produced the dataset enclosed in the attachment. Now I want to add a column percentage total per exception code, grouped by prg_catg. AS you can see I used colpctn however unable to get it to work in the individual columns. It need to be a separate measure based on gross loan amount and the number of cnt_cd, shown in the VAR section. The yellow portion represents where I want to put the data.