8 Replies Latest reply on Nov 14, 2014 12:15 PM by KK Molugu

# Box plot: do not use outliers to determine axis range

Hallo,

Is there a way to ignore the outliers determining the axis range of a box plot? What I mean is the following: in the screenshot below, there is an extreme outlier at the top, making the box plot (and the average trendline) very hard to read. I'd like to be able to set the y-axis range based on the upper whisker for example.

• ###### 1. Re: Box plot: do not use outliers to determine axis range

You need to create a filter that is based off of whatever logic you use to determine as "insignificant."

For example if you wanted items that were within one standard deviation from the average you would create a calc like below:

sum([Sales])<=window_avg(sum([Sales]))+1*window_stdev(sum([Sales]))

Place on your filters shelf, compute using whatever your lowest level of detail is at restarting at whatever your column field is.  Set to true.

If you wanted to adjust the number of standard deviations you could just replace the "1" with a parameter.

• ###### 2. Re: Box plot: do not use outliers to determine axis range

Hi Aaron,

Thanks for the reply. However, wouldn't this solution cause the box plot itself to change since we are filtering out the outliers before we draw the box plot? I want the outliers to be still in the data when doing the calculations. I just don't want them to show up in the graph (at least not the extreme ones).

Anyway, your answer actually helped me in a different area. I was wondering how I could set filters based on aggregated calculations, but I haven't realized that I could simply create a boolean calculation and place that on the filter shelf. So thanks for that!

• ###### 3. Re: Box plot: do not use outliers to determine axis range

Ah, just noticed that was the behavior.  I'll have to think of something else.  Never realized box blot lines were based off of visible data and disregards "hidden" data.

• ###### 4. Re: Box plot: do not use outliers to determine axis range

Can you share sample worksheet.

• ###### 5. Re: Box plot: do not use outliers to determine axis range

I don't have a solution for this now that I know box plots don't account for hidden data.

• ###### 6. Re: Box plot: do not use outliers to determine axis range

I would also love to get a solution for this. I want to maintain the outlier data in calculation of the box plot, but given they are by outliers by definition, it seems sensible to be able to hide them from the view, so that the axis is adjusted appropriately to fit the box plot. I hope Tableau can find a way to solve this!

• ###### 7. Re: Box plot: do not use outliers to determine axis range

Hi Daniel,

Have you tried a log scale in Y-axis? I don't believe that restricting the Y-axis to the level of whiskers be a good alternative as the outliers will be hidden. One of the fundamental function of box plots is precisely to detect/show outliers.

Best

Ramon

• ###### 8. Re: Box plot: do not use outliers to determine axis range

Daniel:

The only option that I can think at this time is to manually change your y-axis and as Ramon Martinez mentioned, this may not be a good visual option to hide outliers from the box-and-whisker, which defeats the purpose...

..kk