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 | ||||||
Protocol | Total PACs | Total Cases in Package Prep | Open WCC Queries | Escalated queries (Pfizer) | Pending Review | Completed Review |
QC | ||||||
Translation | ||||||
1009 | ||||||
1019 | ||||||
1021 | ||||||
1024 | 53 | 53 | ||||
1025 | ||||||
1030 | ||||||
1032 | ||||||
1035 | ||||||
1039 | ||||||
1040 | 1 | 1 | ||||
1041 | ||||||
1043 | ||||||
1044 | ||||||
1045 | ||||||
148 | 2 | 1 | 146 |
this is my desired result
GIPRC | ||||||
Protocol | Total PACs | Total Cases in Package Prep | Open WCC Queries | Escalated queries (Pfizer) | Pending Review | Completed Review |
QC | ||||||
Translation | ||||||
1009 | ||||||
1019 | ||||||
1021 | ||||||
1024 | 53 | 53 | ||||
1025 | ||||||
1030 | ||||||
1032 | ||||||
1035 | ||||||
1039 | ||||||
1040 | 1 | 1 | ||||
1041 | ||||||
1043 | ||||||
1044 | ||||||
1045 | ||||||
sum | 148 | 2 | 1 | 146 |
compute after;
x='sum' ;
endcomp;
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
oh sorry I just updated my code
compute after;
x='sum' ;
endcomp;
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.
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.