BookmarkSubscribeRSS Feed
BrahmanandaRao
Lapis Lazuli | Level 10

 

data sales;
input jan feb mar ;
datalines;
1 1 1
2 2 2
3 3 3
5 6 7
;
run;






proc print data=sales noobs  grandtotal_label='Monthly_Sum' ;
var jan feb mar ;


sum jan feb mar  ;
run;

i want label total sum 

 

            

an feb mar
1 1 1
2 2 2
3 3 3
5 6 7
11 12 13

 

1 REPLY 1
Kurt_Bremser
Super User

The PRINT procedure needs a place where it can put the summary labels. For this it needs a column for which no summing is done (meaning a character column). Since your dataset contains only numeric variables (and you sum them all), the procedure can't print the label.

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 1 reply
  • 1041 views
  • 1 like
  • 2 in conversation