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
Diamond | Level 26
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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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