LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 15 Sep 2005 10:40:39 -0400
Reply-To:   Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:   Re: need to calculate median not sure how to do it
Comments:   To: Greg Curson <gscsrc@HOTMAIL.COM>

Greg,

You could use proc summary. For example,:

proc sort data=one; by conum supplier LINENum; run;; proc summary data=one nway; var cost; by conum supplier LINENum; output out=two (drop=_:) median=mediancost; run; data desired; merge one two; by conum supplier LINENum; run;

Art ------- On Thu, 15 Sep 2005 07:01:21 -0700, Greg Curson <gscsrc@HOTMAIL.COM> wrote:

>I have more fields in my dataset than what is shown below but >I need to code for the median price of cost and I need to put it into >the dataset and would like to create a field called mediancost >I want to put it into the dataset because I have more I have to >do with it than just find the median cost > >I need the median of cost by the LINENum, supplier and conum >see LINENum will repeat when there is a new conum


Back to: Top of message | Previous page | Main SAS-L page