The SAS Output Delivery System and reporting techniques

Proc Tabulate:How to do color formatting of a particular cell with comparing another cell value

Reply
New Contributor
Posts: 2

Proc Tabulate:How to do color formatting of a particular cell with comparing another cell value

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

 

Super User
Super User
Posts: 9,193

Re: Proc Tabulate:How to do color formatting of a particular cell with comparing another cell value

Posted in reply to sai_prasad

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).

SAS Super FREQ
Posts: 9,253

Re: Proc Tabulate:How to do color formatting of a particular cell with comparing another cell value

Posted in reply to sai_prasad
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

Ask a Question
Discussion stats
  • 2 replies
  • 224 views
  • 0 likes
  • 3 in conversation