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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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