BookmarkSubscribeRSS Feed
SASPhile
Quartz | Level 8
break after terr_id /summarize skip ol style=[font_weight=bold background=grey];

For the above break statement, the output looks as below:
terr_id phy_name state mg
1234 abc_name KS 500

If the display has to be as shown below:

terr_id phy_name state mg
1234 total abc_name KS 500

how to show the word "total" next to the terr_id after summarizing?
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
You will have to use a COMPUTE block. There have been many previous forum postings on using the COMPUTE block. You will have to use slightly different techniques, depending on whether terr_id is numeric or character. The basic model for the COMPUTE block will be:
[pre]
COMPUTE AFTER TERR_ID;
. . . assignment and other statements go here . . .
ENDCOMP;
[/pre]

Investigation of previous forum postings and the PROC REPORT documentation should help you figure out what you want to do.

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
  • 626 views
  • 0 likes
  • 2 in conversation