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;

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