BookmarkSubscribeRSS Feed
PSR
Calcite | Level 5 PSR
Calcite | Level 5
Hi ,

anybody having idea about how to get alternate shaded rows in proc tabulate.
2 REPLIES 2
Bill
Quartz | Level 8
I don't know about alternate columns necessarily, but here's what I used to shade specific columns. For readability, every third or even fourth column is actually quite sufficient.

First, build a colour format with something like

Proc format:
value $bkgrnd
"Lvl1','Lvl2','Lvl3'='cxf6f5ea'
other='cxffffff';
run;

Then in proc tabulate, under the ODS umbrella, apply the $bkgrnd format to the class variable that contains the values of Lvl1, Lvl2,Lvl3,... with
classlev LvlVarname/style=[background=$bkgrnd.];

Not my invention, I think Cynthia helped me through this one. You should be able to find more in the archives in the ODS section.

Hope this helps at least a little bit!
Cynthia_sas
SAS Super FREQ
Hi:
To achieve banding (differing row colors) in Proc Tabulate, where the whole -row- is colored (not just the class level values), you need to investigate the use of the <parent> syntax in proc tabulate for making style changes.

Here's an output example:
http://support.sas.com/kb/25/addl/fusion25401_1_odstab10.htm

Here's the Tech Support note with the code (second to last example):
http://support.sas.com/kb/25/401.html

There's another example, in my paper, here:
http://www2.sas.com/proceedings/forum2008/173-2008.pdf

And the programs for that paper are downloadable from:
http://support.sas.com/rnd/papers/sgf2008/complex_reports.zip

cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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