I am creating a table with a two-level column and a one-level row. From the code below, I would like to highlight the entire column under the "Pass" header. However, I can only get the cell in the header labeled "Pass" to highlight. I tried adding *[s=<parent>] after the rowpctn entry in the column section of the TABLE statement, but that made all five columns under the "Percent" header have the same format as the "Percent" header cell. Is there something I missed that I should be doing instead?
proc format;
value rslt 1='Pass'
2='Inc'
3='Fail'
4='W/D'
5='N/A';
value ol 0='Campus'
1='Online';
value rescol 1='grey';
value $term '201510'='Fall 2014'
'201410'='Fall 2013';
run;
proc tabulate data=ros_w_st_info missing;
class term_code course bid online campus_desc;
class result;
classlev result /s=[background=rescol.];
format result rslt. online ol. term_code $term.;
table course='',
(campus_desc='' all='College'*[s=[font_weight=bold]])*term_code='',
n='Students'*(all='Total' result='') rowpctn='Percent'*result=''*f=10.
;
where substr(term_code,6,1) = '0' and campus_code ^= 'J' and term_code in ('201510','201410');
title 'Campus-based Students Taking Pre-College and Core English and Math in Fall 2014';
run;
Hi:
Nobody can run your program without making up data and when making up data, there's no guarantee that someone will make up the same structure. Do you have a small test dataset that you can post or can you recast the program using one of the SASHELP datasets?
cynthia
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.