Visualizing Average with Removing Outliers

Hey all, looking to get some help on a topic that has had me stumped.

I am currently charting the average compile times (which the compile time is a scripted field on the index pattern), bucketed by month using a date histogram using a line chart. However, I want to filter out documents that are outliers (either >90th percentile or more than two std deviations from the computed average).

I am stumped as to how this would be achieved (if it can be at all currently with basic visualizations). Ideally, I would like to chain aggregate queries, to first aggregate the standard deviation (or percentile) and then use that data to do a filtered average aggregation.

From searching around on the forums, the most similar question I've found is this post which confirms my doubt of this being possible due to requiring two separate queries. Is this still the case today, is a Vega visualization the only way to feasibly do this?


Vega is still the recommended solution for that due to the chained queries.

1 Like

Thanks for confirming my suspicion! Do you happen to have any example of this being done (or something similar)?

I haven't found a specific one, but I think this might help: Scale | Vega-Lite

Awesome, I appreciate all the help Marius!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.