BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mona4u
Lapis Lazuli | Level 10

I want to place the word sum in the last row 

 

this is my code 

proc report data=all1;
column (" " x);
column ("GIPRC" TOTAL_PACs_GI total_cases_GI Open_GI ESCGI pending_review_GI completed_Review_GI );
DEFINE X/ "Protocol";
define TOTAL_PACs_GI/ sum "Total PACs" ;
define total_cases_GI/ sum "Total Cases in Package Prep/QC/Translation";
define Open_GI/ sum "Open WCC Queries";
define ESCGI/ sum "Escalated queries (Pfizer)";
define pending_review_GI/ sum"Pending Review";
define completed_Review_GI/sum "Completed Review";

RBREAK AFTER / SUMMARIZE;
RUN;

 

this is my current result 

 

 GIPRC
ProtocolTotal PACsTotal Cases in Package PrepOpen WCC QueriesEscalated queries (Pfizer)Pending ReviewCompleted Review
QC
Translation
1009      
1019      
1021      
102453    53
1025      
1030      
1032      
1035      
1039      
10401    1
1041      
1043      
1044      
1045      
 14821  146

 

 this is my desired result 

 GIPRC
ProtocolTotal PACsTotal Cases in Package PrepOpen WCC QueriesEscalated queries (Pfizer)Pending ReviewCompleted Review
QC
Translation
1009      
1019      
1021      
102453    53
1025      
1030      
1032      
1035      
1039      
10401    1
1041      
1043      
1044      
1045      
 sum14821  146
1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
compute after;
 x='sum' ;
endcomp;

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Since you don't have a BREAK or RBREAK statement in your code, I assume that the last row is already in data set ALL1. Is that  correct?

 

If so, you would need to either

  1. If X is numeric, apply a format to the value of X in the last row so that the word SUM appears there; or
  2. If X is character, just change the value of X to 'Sum'
--
Paige Miller
mona4u
Lapis Lazuli | Level 10

oh sorry I just updated my code 

Ksharp
Super User
compute after;
 x='sum' ;
endcomp;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 3 replies
  • 1432 views
  • 0 likes
  • 3 in conversation