Hi: PROC TABULATE basically replaces one set of attributes with the other in the event of conflicts between the row and the column style overrides. Typically, with TABULATE, you have to re-specify ALL the attributes you want to have in effect because TABULATE doesn't do inheritance the way you want. It is possible to get what you want with both REPORT and TABULATE, as shown below:
It's a bit more complicated using REPORT because AGE is numeric and you need to create a computed item to get a text string such as Total on the summary line. But the same results are do-able with either REPORT or TABULATE.
Cynthia
Hi Cynthia,
Proc report allows merging styles (style/merge might be the default option?) while proc tabulate does not.
That's what I wanted to check.
proc report allows me to simply make a column with an attribute, a row with another and the crossing with both.
proc report data=SASHELP.CLASS;
columns AGE WEIGHT HEIGHT ;
define AGE / group ;
define WEIGHT / analysis;
define HEIGHT / analysis style=[font_weight=bold];
rbreak after / summarize;
compute after;
call define(_row_,'style','style=[color=green]');
endcomp;
run ;
There's no way with proc tabulate to have one row in green thin, one col in bold, and only one cell on green bold it seems.
Thank you for refreshing my memory about header and parent inheritance, and about precedence. 🙂
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: