BookmarkSubscribeRSS Feed
Q1983
Lapis Lazuli | Level 10

Data app_summary2;

Set app_summary;

Run;

 

Sample data output

Loan_Officer          ID         PCT4      stp1                      ln

SMITH                   a100       80%        4                              5

SAMPSON           B50         20%        1                              5

FRANKLIN           C100      50%        1                              2

BALDWIN             D10        0%          0                              5

GRAND TOTAL

 

MY PROC REPORT IS BELOW.

 

I NEED TO TOTAL THE PCT4(PERCENT COLUMN AND REFLECT THE AVG IN THIS CASE 37%

I ALSO NEED TO TOTAL THE STP1 AND LN COLUMNS FOR A GRAND TOTAL AT THE BOTTOM

I DID AN RBREAK AT THE BOTTOM HOWEVER NO TOTALS APPEAR                                                                           

 

PROC REPORT DATA= app_summary2 headskip split='*' wrap nowd

 

           style(column)=[background=white font_size=10pt bordercolor=black borderwidth=1]

          

           ;

 

COLUMN LOAN_OFFICER RACF_ID pct4 stp1 ln;     

         

    

 

           DEFINE  LOAN_OFFICER /  Display style(column)={cellwidth=80pt just=right} "Loan Officer";

           DEFINE  ID /  Display style(column)={cellwidth=80pt just=right} "LO_RACF";

           DEFINE  pct4    /  Display style(column)={cellwidth=80pt just=right} "Sum of % Sent to Processing";

           DEFINE  stp1    / sum Display style(column)={cellwidth=120pt just=right} "Sum of SENT_TO_PROC_BY_END_RPT_MO";

           DEFINE  ln / sum Display style(column)={cellwidth=80pt just=right} "Sum of CT_LN_NBR";

           rbreak after /summarize;

 

compute after;

 

    stp1 = 'Total';

     /*ln = 'Total';*/

 

endcomp;

          

FOOTNOTE1 justify=Left Height=8pt "&FNote1";

           FOOTNOTE2 justify=Left Height=8pt "&ReportName";

          

 

          

           run;

1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
Numbers only appear for analysis items. PCT4, STP1 and LN are all given either DISPLAY or SUM DISPLAY as the usage. SUM DISPLAY is not really the usage you want. You want one (ANALYSIS SUM or just SUM) or the OTHER (DISPLAY), but not both. Since DISPLAY is the last usage listed in the DEFINE statement it "wins". I'm not sure I understand what numbers you want to see, but if you want to see an average on the summary line for PCT4, then instead of DISPLAY, I would recommend a usage of MEAN. Although I note that all of your labels use the word "Sum" so perhaps your statement that you wanted an average was just a typo.

cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 587 views
  • 0 likes
  • 2 in conversation