BookmarkSubscribeRSS Feed
mona4u
Lapis Lazuli | Level 10

Hi, 

I have this issue with proc print. I'm trying to have the value "Total" in the last cell of study_name column. 

I tried the  grandtotal_label='Total' option but it shows the value in the obs column. 

I don't want to use proc report 

 

data have;
input study_name $ June July August;
datalines;
A 20 16 39
B 18 18 6
C 19 1 5
D 87 65 115
E 63 55 62
F 81 104 87
G 73 19 49
H 189 69 79
I 28 6 8
J 87 83 52
K 0 0 0
L 0 0 0
M 4 1 1
N 1 0 2
O 212 159 304
;

proc print data=have grandtotal_label='Total' label ;
sum June July August;
label study_name="Study";
run;

Capture1234.PNG

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

"I don't want to use proc report " - why not?  Proc report does this, use it.  Its much like saying I only want to use a mouse to type this letter, you can do it, by why?

 

Anyways:

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002262174.htm

mona4u
Lapis Lazuli | Level 10

Bc I want to learn the method to assign Total to be under Study. 

I'm sure there is a way 

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!

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
  • 2 replies
  • 735 views
  • 3 likes
  • 2 in conversation