# 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:** 5

<div class="post-metadata">

### Author: ![micaelle](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@micaelle](https://discuss.elastic.co/u/micaelle)
#### Post date: [May 30, 2022, 3:47pm UTC](https://discuss.elastic.co/t/if-condition-in-kibana-table-visualization/305751/5 "2022-05-30T15:47:59Z")

</div>

I have the data about the transactions made by the users and also about the accounts that made those transactions. I need to count how many accounts there are and how many pix there were and if the amount of accounts is less than 100 and the amount of pix is less than 500, the total cost will be 2,000.00, if the amount of accounts is less than 200 and the amount of pix less than 1000, the total cost will be 4,000.00.

The formula I'm still building because I'm a beginner in elastic, but the condition would be like count(operations.keyword pix.sent) + count(operations.keyword pix.received) \<500 and unique\_count(account\_id.keyword) \<100 then

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

---

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