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

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!

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