PROC TABULATE DATA=RESULT ;
VAR SRVC_ID;
CLASS " Deal"n / ORDER=UNFORMATTED MISSING style=[ font_weight=medium];
CLASS Week/ ORDER=UNFORMATTED MISSING style=[ font_weight=medium cellwidth=175];
TABLE /* Row Dimension */
Week= ' ' all='Total',
/* Column Dimension */
'Deal'n = ' ' *(SRVC_ID=' '*N=' ') All= ' '* n = 'Total' ; RUN;
I want the cellwidth of Week as 175 but when I do Week= ' ' (in above code) then cellwidth=175 does not work. However cellwidth works when I put Week all = 'Total'.
Can someone help me adjust width of field Week? Thanks!
Try adding a
classlev WEEK / style=[ font_weight=medium cellwidth=175 ];
statement.
Try adding a
classlev WEEK / style=[ font_weight=medium cellwidth=175 ];
statement.
Thank you @ChrisNZ and @Cynthia_sas.
ChrisNZ, it works just fine.
Cynthia, you example improved the looks of my results.
Hi
175 what? 175 pixels? Probably not 175 CM or INCHES. Probably not 175 printer's points. I do not observe the same behavior that you describe. To impact the "row title area" (where you have WEEK and I have PRODUCT), all you need to do is either use a CLASSLEV statement or use a style override for the BOX area. My example below uses the BOX approach for the row title area with PRODUCT and the CLASSLEV approach for REGION.
I also made some font changes so you could see other ways to impact width (such as I show in the column dimension for Region).
Cynthia
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.