# Kibana json input filter

**URL:** <https://discuss.elastic.co/t/kibana-json-input-filter/224812>\
**Category:** Kibana\
**Created:** [March 24, 2020, 11:11am UTC](https://discuss.elastic.co/t/kibana-json-input-filter/224812 "2020-03-24T11:11:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammad\_Mousavi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohammad_mousavi/32/56508_2.png) [@Mohammad\_Mousavi](https://discuss.elastic.co/u/Mohammad_Mousavi)\
**Post date:** [March 24, 2020, 11:11am UTC](https://discuss.elastic.co/t/kibana-json-input-filter/224812/1 "2020-03-24T11:11:26Z")

</div>

Hi, I wanna create vertical bar chart with 2 bars.  
Both of them are sum of one field (Duration) but based on a condition on another field.  
one bar is sum of duration when  
 ![pr](https://us1.discourse-cdn.com/elastic/original/3X/b/7/b73c31cdc16e0e5652e2f67d6831bcb67ec752e1.png)

and another when

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

now I think I should add some condition.

![metric](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2e22a7c1bbf0b94d282f8705e0d103b37ac9583e.png)  
What should I add in json field in metrics to separate them ?  
Thanx a lot

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [March 24, 2020, 11:27am UTC](https://discuss.elastic.co/t/kibana-json-input-filter/224812/2 "2020-03-24T11:27:22Z")

</div>

You need to add the Filters on the X axis, and then your Y axis would be just the Sum. Trying to replicate your use case using the sample flights data, I wanted to sum the average price on a chart with two bars, for two specific carriers.

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

Is this what you want to achieve?

---

<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:** [April 21, 2020, 11:27am UTC](https://discuss.elastic.co/t/kibana-json-input-filter/224812/3 "2020-04-21T11:27:26Z")

</div>

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