# If condition in Kibana Table Visualization

**URL:** <https://discuss.elastic.co/t/if-condition-in-kibana-table-visualization/305751>\
**Category:** Kibana\
**Created:** [May 26, 2022, 8:05pm UTC](https://discuss.elastic.co/t/if-condition-in-kibana-table-visualization/305751 "2022-05-26T20:05:45Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [June 1, 2022, 8:34am UTC](https://discuss.elastic.co/t/if-condition-in-kibana-table-visualization/305751/6 "2022-06-01T08:34:24Z")

</div>

Hi @micaelle,

while there's no current conditional helpers yet available in Lens, it is possible to achieve something like you want using some math. I've written some explanation in here on how to leverage the `clamp` function for this use case: [Dec 4th, 2021: [en] Advanced trick and tips in Lens](https://discuss.elastic.co/t/dec-4th-2021-en-advanced-trick-and-tips-in-lens/289935#comparing-against-a-static-value-7)

In your example, you probably have to add one more layer of complexity there as you depends on two distinct conditions:

```auto
(
clamp( count(operations.keyword pix.sent) + count(operations.keyword pix.received) - 500, 0, 1) + 
clamp( unique_count(account_id.keyword) - 100, 0, 1)
) * 2000

```

---

_[View the full topic](https://discuss.elastic.co/t/if-condition-in-kibana-table-visualization/305751)._
