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
Diamond | Level 26
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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 906 views
  • 0 likes
  • 2 in conversation