问题
Thanks for your help in advance.
Regards, Raj
回答1:
Adding the values to MAX()
values would skew the data even if it were possible. There are two hacks to do this though.
- Right Click > Properties > Y-Axis > set the
MIN
range value andMAX
range values to something that would eliminate all outliers. This is really only suitable for box plots that are close in all values to each other (all percentiles) - On your toolbar click Insert > Calculated Column > choose the correct data table and paste in the expression below. You will need to replace the [x-axisColumn] and the [y-axisColumn] with what ever is on the X and Y axis of your box plot. To find out what this is, right click on your box plot > properties > X-Axis and there it will tell you what your X-Axis column is. Do this for the Y-Axis as well. This will create a column called "Outlier" in your data table with three options: NotOutlier, UpperOutlier, LowerOutlier. You just need to uncheck "UpperOutlier" and "LowerOutlier" to remove your outliers.
`
case
when [y-axisColumn]<(Q1([y-axisColumn]) - (1.5 * IQR([y-axisColumn]) OVER ([x-axisColumn]))) then "LowerOutlier"
when [y-axisColumn]>(Q3([y-axisColumn]) + (1.5 * IQR([y-axisColumn]) OVER ([x-axisColumn]))) then "UpperOutlier"
else "NotOutlier"
end as [Outlier]
`
来源:https://stackoverflow.com/questions/38397514/how-to-eliminate-outlier-in-spotfire-box-plots