|
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
|