BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Is there a way to avoid repetition of the first group id in the first row after the summary line when this one was produced by break before ... / summarize? See the following code:
proc report data=sashelp.class headskip nowd;
column sex name (age height weight),mean;
define sex / group width=3;
define name / group;
break before sex / summarize;
break after sex / skip;
compute before sex; name='Total'; endcomp;
run;
2 REPLIES 2
polingjw
Quartz | Level 8
You could add a second compute block:

proc report data=sashelp.class headskip nowd;
column sex name (age height weight),mean;
define sex / group width=3;
define name / group;
break before sex / summarize;
break after sex / skip;
compute before sex; name='Total'; endcomp;
compute sex;
IF UPCASE(_BREAK_) NE 'SEX' THEN SEX= ' ';
ENDCOMP;
run;
Cynthia_sas
SAS Super FREQ
Hi:
Also, if you are going to use ODS eventually to send this output to RTF, PDF or HTML output files, remember that options such as HEADLINE, HEADSKIP, SKIP, and WIDTH= are only used by the LISTING window and will not work for other ODS destinations. So, for example, if you wanted to perform the EQUIVALENT of a SKIP for other ODS destinations, you would need to add:
[pre]
compute after sex;
line ' ';
endcomp;
[/pre]

because the SKIP in your code would be ignored.

cynthia

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 610 views
  • 0 likes
  • 3 in conversation