# Unable to configure precision\_threshold for Unique Count in Kibana Lens (v9.3.3)

**URL:** <https://discuss.elastic.co/t/unable-to-configure-precision-threshold-for-unique-count-in-kibana-lens-v9-3-3/386505>\
**Category:** Elasticsearch\
**Created:** [May 26, 2026, 12:29pm UTC](https://discuss.elastic.co/t/unable-to-configure-precision-threshold-for-unique-count-in-kibana-lens-v9-3-3/386505 "2026-05-26T12:29:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vignesh2](https://avatars.discourse-cdn.com/v4/letter/v/5f8ce5/32.png) [@Vignesh2](https://discuss.elastic.co/u/Vignesh2)\
**Post date:** [May 26, 2026, 12:29pm UTC](https://discuss.elastic.co/t/unable-to-configure-precision-threshold-for-unique-count-in-kibana-lens-v9-3-3/386505/1 "2026-05-26T12:29:24Z")

</div>

Hi team,

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.

Running the same query in Dev Tools:

```json
GET my_index/_search
{
  "size": 0,
  "aggs": {
    "unique_convs": {
      "cardinality": {
        "field": "conversationId",
        "precision_threshold": 40000
      }
    }
  }
}

```

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**

1. Is there any supported way to set `precision_threshold` for Unique Count in Lens or any other visualization in Kibana 9.3.3?
2. If not, is there a recommended workaround other than Vega for displaying an accurate unique count on a production dashboard?
3. 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.

Thanks,  
Vignesh

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 26, 2026, 2:09pm UTC](https://discuss.elastic.co/t/unable-to-configure-precision-threshold-for-unique-count-in-kibana-lens-v9-3-3/386505/2 "2026-05-26T14:09:26Z")

</div>

Wrong Thread, Thread Open Again

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 26, 2026, 2:09pm UTC](https://discuss.elastic.co/t/unable-to-configure-precision-threshold-for-unique-count-in-kibana-lens-v9-3-3/386505/3 "2026-05-26T14:09:32Z")

</div>



---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 26, 2026, 2:52pm UTC](https://discuss.elastic.co/t/unable-to-configure-precision-threshold-for-unique-count-in-kibana-lens-v9-3-3/386505/4 "2026-05-26T14:52:55Z")

</div>



---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [May 26, 2026, 6:04pm UTC](https://discuss.elastic.co/t/unable-to-configure-precision-threshold-for-unique-count-in-kibana-lens-v9-3-3/386505/5 "2026-05-26T18:04:21Z")

</div>

There is an open issue about this, one workaround mentioned is to use an ESQL visualization where you can set the precision:

> <https://github.com/elastic/kibana/issues/69832>
>
> The default precision value of the Cardinality aggregation is 3,000 documents: a…bove 3,000, the precision will drop off. The max value is 40,000 in Elasticsearch. Users should be able to tune this parameter in Lens. I propose that we use a \*\*numeric text input with validation\*\* instead of a slider, but the second-best option would be \*\*grouped button at 1000, 3000, 10000, and 40000\*\* thresholds.
> 
> Lens should also provide some helper text to indicate that this is not a precise aggregation. I propose that we put this helper text in the editor panel for Unique count, and that the text should be:
> 
> \> Unique count is precise only when the count is lower than the precision threshold. The estimate will be more accurate for higher thresholds, which uses more server resources.
> 
> This text is trying to indicate that the queries won't be slower, but that there are other costs associated to running the high-precision queries. This is based on some of the docs here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-cardinality-aggregation.html
> 
> cc @cchaos do you agree with the proposal to use a numeric input instead of grouped buttons? A slider would be a bad option here since there aren't many possible options. No design needed.

---

<div class="post-metadata">

**Author:** ![RainTown](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raintown/32/140206_2.png) [@RainTown](https://discuss.elastic.co/u/RainTown)\
**Post date:** [May 27, 2026, 10:10am UTC](https://discuss.elastic.co/t/unable-to-configure-precision-threshold-for-unique-count-in-kibana-lens-v9-3-3/386505/6 "2026-05-27T10:10:34Z")

</div>

I try not to "moan" too often.

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.
