BookmarkSubscribeRSS Feed
rm17tink
Calcite | Level 5

I need to summarize specific columns after my 'break after' the reason being I dont need my percentage columns summed up in that break row. it looks quit ugly. Also I want to name my Break After Rows with a different title. Any help

6 coulmns of data grouped by X

Break After X  to Sum only columns of values not percentages

Thanks.

1 REPLY 1
Cynthia_sas
SAS Super FREQ

Hi: Without seeing your data or the program you've tried, it is hard to make a constructive suggestion. However, usually if you want to prevent the automatic summary of a column, you define it as a DISPLAY (or ORDER or GROUP) usage. Consider this program where AGE is summarized (because default usage is ANALYSIS SUM) but HEIGHT and WEIGHT are NOT summarized because of the usage of display.

    
Cynthia


proc report data=sashelp.class;

  where age in (12, 13, 14);

  title 'Turn off Summarize for HEIGHT and WEIGHT';

  column  sex  name  age height weight;

  define sex / order 'Gender';

  define name / display;

  define age / 'Age';

  define height / display;

  define weight / display;

  break after sex / summarize;

  rbreak after  / summarize;

run;

 

The results:

turn_off_summarize.png

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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