BookmarkSubscribeRSS Feed
2 REPLIES 2
Ksharp
Super User

Can you post some data of dataset(final2) used by PROC REPORT.

And the output you need. the best is a snapshot .

ArtC
Rhodochrosite | Level 12

As Ksharp suggests it is a bit hard to be specific without seeing more of the problem, but ....  You can let REPORT do your summarizations for you.  This simplifies your code and can speed up the processing.  In this small example the BREAK and RBREAK statements (with the SUMMARIZE option) are used to create subtotals and totals.  Notice that the define usage is GROUP rather than ORDER.

proc report data=sashelp.prdsale nowd;

column product quarter actual;

define product / group;

define quarter / group;

define actual / sum;

break after product/summarize;

rbreak after/summarize;

run;

As an aside verify that your calculation for AGE is close enough.  if you only have the year for the DOB then this is about all you can do, otherwise there are more appropriate ways to calcuate a persons age.  http://www.wuss.org/proceedings10/coders/2943_4_COD-Carpenter.pdf

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