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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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