How to set min_doc_count for bucket in Lens visualization?

I need to create a Formula Metric in a Lens visualization on some terms/top value buckets.

I only want to calculate the metric for buckets with at least 10 records. How do I ensure that?

I know that in the aggregation-based visualizations I can add the following JSON input in the Advanced settings for the bucket specification: {"min_doc_count": 10}.

image

How can I do something similar in a Lens visualization, which I need to be able to calculate my formula metric?

1 Like

I don't think in Lens you can filter by the result of your aggregation at this moment.

Any ideas @flash1293 ?

Hi @jakn—This is not currently possible in Lens. You could either stick with the agg-based visualizations for now, or you could create a custom visualization (Vega) which gives you complete control over the query that is used to back the chart.

1 Like

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