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!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1467 views
  • 0 likes
  • 2 in conversation