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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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