BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Kafi
Calcite | Level 5

Hi everyone,

this is a beginner's question, but I can't find anything similiar in the forum.

I use proc MEANS to determine min and max values:

PROC MEANS DATA=WORK.PARCELDT MIN MAX;  

VAR WEIGHT;                             

CLASS WEEKNUM CARTON LENGHT WIDTH THICK;

The output is:

WEEKNUM     CARTON     LENGHT     WIDTH     THICK     N Obs     Minimum     Maximum

    1                       0     800     650     300     1     167000     167000

                                  1200     800     1200     1     59000     59000

                                1700     1300     960     1     675000     675000

                           17     750     750     480     102     23000     716000

But it shoud be as following:

WEEKNUM     CARTON     LENGHT     WIDTH     THICK     N Obs     Minimum     Maximum

    1                       0     800     650     300     1     167000     167000

    1                       0     1200     800     1200     1     59000     59000

    1                       0     1700     1300     960     1     675000     675000

    1                       17     750     750     480     102     23000     716000

Are there an output options for this?

Thanks!

Kathy

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Are you talking about the appearance of the report that PROC MEANS produces?  If you ask it to create a dataset the values are there, it is just that the report does not replicate the common values so that it is easier to read.

proc means data=work.parceldt nway noprint ;

  class weeknum carton lenght width thick;

  var weight;

  output out=want min= max= /autoname ;

run;

proc print data=want;

run;

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Are you talking about the appearance of the report that PROC MEANS produces?  If you ask it to create a dataset the values are there, it is just that the report does not replicate the common values so that it is easier to read.

proc means data=work.parceldt nway noprint ;

  class weeknum carton lenght width thick;

  var weight;

  output out=want min= max= /autoname ;

run;

proc print data=want;

run;

Kafi
Calcite | Level 5

easy Smiley Happy

I tried proc print as well, but I missed the NWAY option :smileyblush:

Thank you!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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