proc print data=sashelp.class
noobs round GTOTAL_LABEL="TOTAL" style(header)={backgroundcolor=cyan color=black fontsize=2 fontweight=bold just=center}
style(header data)={bordertopwidth=.5 borderbottomwidth=.5
borderleftwidth=.5 borderrightwidth=.5 borderstyle=solid bordercolor=black};
sum height age /STYLE(GRANDTOTAL)={backgroundcolor=cyan color=black fontsize=2};
var name;
var age height ;
run;
I am not getting Total to be wriiten in Output. Can anybody help me with proc print GTOTAL_LABEL options available in proc print .
Works with a BY statement. Otherwise, without a BY statement in PROC PRINT, no GRANDTOTAL is printed, only a SUM is printed (and you can use SUMLABEL=' ').
With sumlabel as well I am not getting Total . Is SUMLABEL also works with BY only ?
From the docs:
SUMLABEL='label'
specifies the text to use as a label on the summary line of a BY group. You can include the #BYVAR and #BYVAL variables in 'label'.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.