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'.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.