BookmarkSubscribeRSS Feed
jackguo
Fluorite | Level 6

Hi,

Question about Proc Report: when use break to summarize data by group/sub-group, is there a way to add row title for total/sub-total to the report? For example: there are groups of Region and Branch, can we add the row title like 'Total for Region (Eastern,Western, and Central respectively):' on the group total row? Also,, are we able to add 'Grand Total' for the report total row at the bottom of the report?

Thanks!

4 REPLIES 4
ChrisHemedinger
Community Manager

Do you have access to SAS Enterprise Guide?  If so, you might find the List Report Wizard to be a great help to jump start your program.  (Find it under Tasks->Describe.)   It supports Totals and Subtotals and various other common reporting scenarios, and it generates relatively clean PROC REPORT code that you can adapt.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
jackguo
Fluorite | Level 6

Thank you for the reply! However, I do not have access to EG, also, the program needs to be automated.

ballardw
Super User

You might provide some example data and what the report should look like.

I can usually do something like that in Proc Tabulate with a multilabel format, having the row text read something like ''Total for Eastern Region" but I don't believe Proc Report supports multilabel formats and Tabulate cannot due everything report does. Or may require pre-summarization to work.

jackguo
Fluorite | Level 6
Thank you for the suggestion. Will try some other alternatives.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 815 views
  • 0 likes
  • 3 in conversation