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;
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
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.
Ready to level-up your skills? Choose your own adventure.