BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I want to make a table in report format showing results for individuals in two groups and then also means by group. I would like the means for each group to be listed directly under the individual results for that group.

When I do this in SAS (not EG), using proc tabulate, the means are displayed directly under each group. However, when I do this in EG and output in SAS Report format, the means for the two groups are listed at the bottom of the table. Why is this? If I change the output to RTF, the means are displayed as I want them. Is there any way to change this?

Below is the code:
PROC TABULATE
DATA=WORK.CS;
VAR Depression;
CLASS Day / ORDER=UNFORMATTED MISSING;
CLASS group/ ORDER=UNFORMATTED MISSING;
CLASS id / ORDER=UNFORMATTED MISSING;
TABLE /* Row Dimension */
group_name*( id ALL={LABEL='Total'}) ALL={LABEL='Total'},
/* Column Dimension */
Day* Depression={LABEL=' '}* Sum={LABEL=' '}*F=2.0 ; ;

RUN;
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
I believe you are running into this behavior:
http://support.sas.com/kb/18/948.html

The Tech Support note explains that the SASReport XML format does not work the same way with PROC TABULATE group totals as the other destinations. The only workaround is to pick another output type (destination) such as HTML or RTF.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 874 views
  • 0 likes
  • 2 in conversation