# Create Data table with condition

**URL:** <https://discuss.elastic.co/t/create-data-table-with-condition/43261>\
**Category:** Kibana\
**Created:** [March 2, 2016, 2:34pm UTC](https://discuss.elastic.co/t/create-data-table-with-condition/43261 "2016-03-02T14:34:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenbe2204](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chenbe2204](https://discuss.elastic.co/u/chenbe2204)\
**Post date:** [March 2, 2016, 2:34pm UTC](https://discuss.elastic.co/t/create-data-table-with-condition/43261/1 "2016-03-02T14:34:05Z")

</div>

Hi ,

I want to create a Data table with conditions.  
I have 2 fields that I want to create a query between them , for example the fields are:  
status and message.  
I want all the records that status = 'failed' or message = 'error'.  
I also want that the table will contain all the fields under the Index.  
How can I do in in Kibana ?

BR,  
Chen

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [March 2, 2016, 6:55pm UTC](https://discuss.elastic.co/t/create-data-table-with-condition/43261/2 "2016-03-02T18:55:25Z")

</div>

To do this add a query into the box that the top of visualize. Something like this should do:

```auto
status:failed OR message:error

```

---

<div class="post-metadata">

**Author:** ![chenbe2204](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@chenbe2204](https://discuss.elastic.co/u/chenbe2204)\
**Post date:** [March 3, 2016, 9:10am UTC](https://discuss.elastic.co/t/create-data-table-with-condition/43261/3 "2016-03-03T09:10:31Z")

</div>

Thanks 🙂

In the Discover section I can select the fields I want and add filter as you mentioned.  
How can I put all this data in excel ?

---

<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:** [July 6, 2017, 2:00pm UTC](https://discuss.elastic.co/t/create-data-table-with-condition/43261/4 "2017-07-06T14:00:26Z")

</div>


