>>Median is a value in a series of numbers where there are an equal number of values less than and greater than. Not knowing if there may be duplicate values makes this a bit harder. I'd try for the arithmetic mean (by getting the minimumand maximum values via CALCULATE) as a starting point. Where to go from there, I haven't figured out.:-)
>
>You guys are making it too difficult :) It's just the (n+1)/2 value of an ordered list if odd # elements, or average of middle two values in the case of an even number of elements...Cetin is close, but no need to use array, I don't think...
Bruce,
Do I have your blessing?
SELECT yAwrdAmt FROM cdl1 WHERE yAwrdAmt>0 ORDER BY yAwrdAmt INTO CURSOR Query
GOTO RecCount()/2
IF MOD(RecCount(),2)=0
yAmt1=yAwrdAmt
SKIP
yAmt2=yAwrdAmt
yAmt=(yAmt1+yAmt2)/2
ELSE
yAmt=yAwrdAmt
ENDIF
? yAmt
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement