BookmarkSubscribeRSS Feed
NataljaK
Obsidian | Level 7
Below is a Summary table and code for it. Is it possible to color the columns´ content (heading and data) with different colors for different level of class variable FLAG (1 and 2) ?

FLAG
1 2
OVFL Sum 8170.90 120561.00
TOTAL Sum 10562.24 156204.00





PROC TABULATE
DATA=WORK.D03_REPORT_TABLE_AVG(FIRSTOBS=1 )

;

VAR OVFL TOTAL;
CLASS FLAG / ORDER=UNFORMATTED MISSING;
TABLE /* Row Dimension */
OVFL*
Sum
TOTAL*
Sum,
/* Column Dimension */
FLAG ;
;

RUN;
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
PROC TABULATE allows the use of the CLASSLEV statement, along with style=<parent> in order to produce "banded" reports, where the calculated data cells inherit their colors from the parent header cells.

In order for this to work, you might have to move your SUM statistic into the COL dimension instead of the ROW dimension. For an example, see pages 17-20 in the PROC TABULATE section of this paper:
http://support.sas.com/resources/papers/stylesinprocs.pdf

cynthia
NataljaK
Obsidian | Level 7
Thank you for the real assistance!

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 705 views
  • 0 likes
  • 2 in conversation