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

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.

 

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