How to filter out values based on standard deviation? (Elastic Search)

Currently using the latest version of Grafana with ElasticSearch as my backend. The data I’m working with has quite a lot of outliers messing up my averages and I want to filter out based on standard deviation. That is, only consider values within the 5th and 95th percentile.

Can I do this in Grafana when displaying a time series or bar chart of averages? And if so, how would I go about doing it?