# Kibana lens formula distinct by rows

**URL:** <https://discuss.elastic.co/t/kibana-lens-formula-distinct-by-rows/303847>\
**Category:** Kibana\
**Created:** [May 3, 2022, 2:45pm UTC](https://discuss.elastic.co/t/kibana-lens-formula-distinct-by-rows/303847 "2022-05-03T14:45:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wiwinagtor](https://avatars.discourse-cdn.com/v4/letter/w/e95f7d/32.png) [@wiwinagtor](https://discuss.elastic.co/u/wiwinagtor)\
**Post date:** [May 3, 2022, 2:45pm UTC](https://discuss.elastic.co/t/kibana-lens-formula-distinct-by-rows/303847/1 "2022-05-03T14:45:31Z")

</div>

Is there a way to perform using kibana lens a calculated fields table where the formulas changes by row?

For example:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/d/4de713d73285696ce3dcf4cf1cb5b82ea2eea2f0.png)

Or there is another way to do it,

Thanks everyone

---

<div class="post-metadata">

**Author:** ![ghudgins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ghudgins/32/138532_2.png) [@ghudgins](https://discuss.elastic.co/u/ghudgins)\
**Post date:** [May 3, 2022, 5:01pm UTC](https://discuss.elastic.co/t/kibana-lens-formula-distinct-by-rows/303847/2 "2022-05-03T17:01:41Z")

</div>

the "filters" option for your breakdown / rows may get you close to this format

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/9/c92e0fc76870dd82032b255db74900025a6ef99c.png)

also an interesting metric is the ratio of these two numbers via formula  
`count() / count(kql='status:2000')`

---

<div class="post-metadata">

**Author:** ![wiwinagtor](https://avatars.discourse-cdn.com/v4/letter/w/e95f7d/32.png) [@wiwinagtor](https://discuss.elastic.co/u/wiwinagtor)\
**Post date:** [May 3, 2022, 6:31pm UTC](https://discuss.elastic.co/t/kibana-lens-formula-distinct-by-rows/303847/3 "2022-05-03T18:31:00Z")

</div>

Thanks again @ghudgins Problem solved!!!

---

<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:** [May 31, 2022, 6:31pm UTC](https://discuss.elastic.co/t/kibana-lens-formula-distinct-by-rows/303847/4 "2022-05-31T18:31:58Z")

</div>

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