BookmarkSubscribeRSS Feed
Q1983
Lapis Lazuli | Level 10

proc report data=post_deploy_3 nowd;

columns SALE_REP_NM acct_exec_nm THRD_PARTY_ORIG_NM THRD_PARTY_ORIG_CD Total_Count;

define SALE_REP_NM/ group Display style(column)={cellwidth=60pt just=center} "CRC" ;

define Total_Count/analysis sum ;

compute after;

THRD_PARTY_ORIG_CD = "Total";

line "Total" Total_Count.sum ;

endcomp;

run;

 

The code works fine however the Total_Count (label=Grand Total) at the bottom needs to display under the total column.  Sample data enclosed.  It display near the middle of the bottom

2 REPLIES 2
JerryLeBreton
Pyrite | Level 9

Try this:

 

rbreak after / summarize;
compute after ;
  if _break_  = '_RBREAK_' then THRD_PARTY_ORIG_CD = 'Total';
endcomp;

 

If I understand what you're trying to do, this should give a last line with the total in the correct column, and the  word 'Total' in the column immediately to the left of the total value.

 

Q1983
Lapis Lazuli | Level 10

Jerry you are a genious, thanks it worked, I will add this to my coding tips list

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
  • 2 replies
  • 972 views
  • 1 like
  • 2 in conversation