I'm facing an accuracy issue with the Unique Count aggregation in Kibana Lens and could not find a way to configure precision_threshold through the UI.
Environment
Kibana version: 9.3.3
Visualization: Lens (Metric)
Index: ~25,000 unique conversationId values with multiple duplicates per ID
Issue
When I use unique_count(conversationId) in Lens, the result shows 24,345, which is incorrect.
Returns the correct value of 25,000 when precision_threshold is set to 40000. Without precision_threshold, it returns the same incorrect value (24,345) that Lens shows — confirming Lens uses the default threshold of 3000.
What I've tried
Lens Formula: unique_count(conversationId, kql='...') — no parameter for precision_threshold.
Lens Metric → Advanced panel: only shows Normalize / Filter / Hide zero. No JSON input.
Aggregation-based Metric viz: Advanced JSON Input option is no longer visible in 9.3.3 for metric aggregations.
TSVB: panel options do not expose JSON input for cardinality precision.
Searched Stack Management → Advanced Settings and kibana.yml — no global setting found.
Question
Is there any supported way to set precision_threshold for Unique Count in Lens or any other visualization in Kibana 9.3.3?
If not, is there a recommended workaround other than Vega for displaying an accurate unique count on a production dashboard?
Is there a plan to expose this parameter in the Lens UI in future releases?
Any guidance would be greatly appreciated. This is impacting accuracy of reporting tiles on our production dashboards.
But that that issue has been open for 6 years is pretty poor.
Lens is the one of the really core kibana visualizations elements. That ESQL, which didn't exist when the issue was opened, does expose this functionality sort of makes it worse. It is quite far from obvious that the cardinality aggregations is "approximate", I am pretty sure the majority of kibana users would not even know this.
Hopefully someone from Elastic product/dev might see this coming up on the forum and ... the issue says "level of effort" is low.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.