# Filter and Count on a field

**URL:** <https://discuss.elastic.co/t/filter-and-count-on-a-field/324546>\
**Category:** Elasticsearch\
**Created:** [February 2, 2023, 12:31pm UTC](https://discuss.elastic.co/t/filter-and-count-on-a-field/324546 "2023-02-02T12:31:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayur](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@mayur](https://discuss.elastic.co/u/mayur)\
**Post date:** [February 2, 2023, 12:31pm UTC](https://discuss.elastic.co/t/filter-and-count-on-a-field/324546/1 "2023-02-02T12:31:45Z")

</div>

I am trying to calculate Recall from a field, which is populated with two values, TP and FN. Recall formula is Count(TP) / (Count(TP) + Count(FN)). How to achieve this opensearch?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 2, 2023, 12:31pm UTC](https://discuss.elastic.co/t/filter-and-count-on-a-field/324546/2 "2023-02-02T12:31:45Z")

</div>

OpenSearch/OpenDistro are AWS run products and differ from the original Elasticsearch and Kibana products that Elastic builds and maintains. You may need to contact them directly for further assistance.

(This is an automated response from your friendly Elastic bot. Please report this post if you have any suggestions or concerns :elasticheart: )

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 2, 2023, 12:32pm UTC](https://discuss.elastic.co/t/filter-and-count-on-a-field/324546/3 "2023-03-02T12:32:25Z")

</div>

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