BookmarkSubscribeRSS Feed
sai_prasad
Calcite | Level 5

Hi,

 

I am using proc tabulate to produce an ods html report ,

I want to know is there any way to produce color formatting of a particular column values based on other column values dynamically.

 

Regards

sai

 

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Some examples:

https://communities.sas.com/t5/SAS-Procedures/Traffic-Lighting-with-Proc-Tabulate/td-p/83374

http://www2.sas.com/proceedings/sugi31/142-31.pdf

 

You can apply styles and things in proc tabulate, but you may need to output a dataset from tabulate, then use proc report and some computed bits to get what you want (which you haven't shown so I can't tell).

Cynthia_sas
SAS Super FREQ
Hi: Color formatting for PROC TABULATE is based on the value in the cell itself, not on the value of another cell. However, except for kurtosis and skewness and the percent statistics, PROC REPORT can give you the same statistics as TABULATE. So if you need dynamic highlighting, you could try to produce your table with PROC REPORT instead of TABULATE. But you haven't posted any data or any code that you've tried to give folks an idea of what you're starting with. So, it's hard to make a concrete suggestion.

Look at this paper http://support.sas.com/resources/papers/proceedings13/366-2013.pdf on page 13 at the example with PROC REPORT, where the cells for Name, Sex and Age are all highlighted based on the value of the Name variable. Or the example on page 14 where the whole row on the report is changed based on the value of Name.

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!

How to Concatenate Values

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.

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