Friends of precise wording will say at this point that you must be talking about your database and not about Grafana. So assuming we still talking about InfluxDB: You would like to filter for field-values above a certain threshold, e.g. with
P2 > 50 in the beginng of the query and generate daily mean within the timefilter, e.g. with
time(1d). But to my understanding, this would most-likely end up with wrong results cause I think the filter is applied on the raw data first and not the aggregated daily values.
So the better approach would be to build a little more complex flux-query for this. There you can apply filter and aggregations in the order you like. I haven’t done such a query yet, but I feel that I will probably do so very soon and post about this here again.