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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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