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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 1615 views
  • 0 likes
  • 3 in conversation