06-06-2014 02:34 AM
I have some data where the mean (average) will give the wrong impression of the data, because of some few high values. Instead I will like to calculate the median.
How can I do that and display it in a crosstab?
06-06-2014 04:06 AM
normally we use a simple boxplot to calculate the median and other numbers.
I don`t really have a solution to calculate the median on the fly within a crosstab, like avg,min, max etc.
But maybe this will be an acceptable workaround for you?
1. Build a Data Query with simple proc sql
proc sql noprint;
create view TEMP_LASR_VIEW_0 as
CARS5.Type length=6 format=$6. AS Type,
median(CARS5.Horsepower) length=8 format=BEST12. AS Horsepower
(Or use proc means with output out=...)
2. Use the table in your report
Performance will maybe be a problem.
You have to type median into the expression field, because in the default functionlist there isn`t median.