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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1392 views
  • 3 likes
  • 2 in conversation