The SAS Output Delivery System and reporting techniques

Proc tabulate how do i bold row totals

Accepted Solution Solved
Reply
Contributor
Posts: 24
Accepted Solution

Proc tabulate how do i bold row totals

I have a proc tab below

 

 

proc tabulate data=WORK.HRIR99991 missing contents = ' ' S=[foreground=highlight.];
class BUSINESS_UNIT_DESC GENDER_CODE DEPARTMENT_DESC;
var fte;
keylabel Sum = " ";

 

table BUSINESS_UNIT_DESC='FTE Count' * fte * sum ALL*fte /
contents = ' ' misstext=' ' box={label="&boxlabel"} style=[font_weight=bold];

run;

 

what I want is the final column the ALL
*fte to show up bolded  I cannot seem to figure out how to use style=[font_weight=bold] to affexct that last column


Accepted Solutions
Solution
‎12-07-2015 01:18 PM
Super User
Posts: 11,134

Re: Proc tabulate how do i bold row totals

table BUSINESS_UNIT_DESC='FTE Count' * fte * sum ALL*fte * sum*{style=[font_weight=bold]}

View solution in original post


All Replies
Solution
‎12-07-2015 01:18 PM
Super User
Posts: 11,134

Re: Proc tabulate how do i bold row totals

table BUSINESS_UNIT_DESC='FTE Count' * fte * sum ALL*fte * sum*{style=[font_weight=bold]}
Contributor
Posts: 24

Re: Proc tabulate how do i bold row totals

hey thanks but i dont really understand the syntax i tried applying it to a different proc tab below with no luck can you explain that syntax a bit.

 

 

proc tabulate data=WORK.HRIR99991 missing contents = ' ' S=[foreground=highlight.];
class BUSINESS_UNIT_DESC GENDER_CODE DEPARTMENT_DESC;
var fte;
keylabel Sum = " ";


table BUSINESS_UNIT_DESC='Record Count (Some user have multiple records)' * N='Count' ALL*N=Count * N*{style=[font_weight=bold]} /
contents = ' ' misstext=' ' box={label="&boxlabel"};

run;

Super User
Posts: 11,134

Re: Proc tabulate how do i bold row totals

You should be getting syntax errors because you are nesting N with N and have Count without quotes.

 

The basic idea is the style is applied to an element that appears in the table. For CLASS varaibles using the CLASSLEV is best.

When you want a statistics such as N, SUM, Mean appearance modified then the style goes after the statistic.

 

As you wrote:

ALL*N=Count * N*{style=[font_weight=bold]} 

 

Probably mean

ALL*N="Count" *{style=[font_weight=bold]} 

 

Tabulate also has a heirarchy on how to apply style elements when row and column both have style specifications. You may need to set Style_precedence=ROW in the table options after the / .

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 706 views
  • 0 likes
  • 2 in conversation