# Json input

**URL:** <https://discuss.elastic.co/t/json-input/303578>\
**Category:** Kibana\
**Created:** [April 29, 2022, 7:33am UTC](https://discuss.elastic.co/t/json-input/303578 "2022-04-29T07:33:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rituzza](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@rituzza](https://discuss.elastic.co/u/rituzza)\
**Post date:** [April 29, 2022, 7:33am UTC](https://discuss.elastic.co/t/json-input/303578/1 "2022-04-29T07:33:43Z")

</div>

I would like to create a data table analysis in which some Kpi are not related to all documents but only to those that satisfy a certain condition.  
For example, I want to calculate

sum (field1) for documents for which field2 has a certain value.  
Can i filter documents using json inputs?  
 ![Immagine](https://us1.discourse-cdn.com/elastic/original/3X/6/f/6f46a8410bd56e0cb95cb691d41cd7315143928c.png)

---

<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:** [May 5, 2022, 2:11pm UTC](https://discuss.elastic.co/t/json-input/303578/2 "2022-05-05T14:11:59Z")

</div>

In the aggregation based table visualization you can split your table in rows by `field2` and then add a `include/exclude` parameter.

![Peek 2022-05-05 16-10](https://us1.discourse-cdn.com/elastic/original/3X/5/c/5c7bc1366415c80182b084a2feb0e55a81740ca1.gif)

Is this what you were after?

---

<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:** [June 2, 2022, 2:12pm UTC](https://discuss.elastic.co/t/json-input/303578/3 "2022-06-02T14:12:23Z")

</div>

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