BookmarkSubscribeRSS Feed
mmea
Quartz | Level 8

Hi I have this code for a proc report;

 


proc report data=data style(header) = {background = white color = black};
	    columns year week COUNT ;
	    define year/  group style(column)= [background = white font_size=10pt font_weight = bold] style(header) = {background = white frame=void};
		compute after year / style={bordertopcolor=black borderbottomcolor=black height=1px cellpadding=0};
        line ' '; 
        endcomp;
	    define week/  group style(column)= [background = white font_size=8pt] style(header) = {background = white frame=void} ;
		define COUNT/  group style(column)= [background = white font_size=8pt] style(header) = {background = white frame=void};	run;

This give me this kind of table (without the total):

 

Year week count
2020 1 1
  2 3
  3 4
  4 1
2021 1 1
  2 1
  3 1
Total   12

 

I need a total at the end of the table (as shown in the table in bold) - how can I add that? I export to Excel 🙂

1 REPLY 1
andreas_lds
Jade | Level 19

You can find the documentation of proc report here.

The rbreak statement is used to create summary lines.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 301 views
  • 0 likes
  • 2 in conversation