# How to select two fields on the same index

**URL:** https://discuss.elastic.co/t/how-to-select-two-fields-on-the-same-index/153115
**Category:** Kibana
**Created:** [October 19, 2018, 6:29am UTC](https://discuss.elastic.co/t/how-to-select-two-fields-on-the-same-index/153115 "2018-10-19T06:29:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nethaji](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nethaji/32/72803_2.png) [@Nethaji](https://discuss.elastic.co/u/Nethaji)
#### Post date: [October 19, 2018, 6:29am UTC](https://discuss.elastic.co/t/how-to-select-two-fields-on-the-same-index/153115/1 "2018-10-19T06:29:02Z")

</div>

Hi,

how to select two fields on the same chart?

because of i'm having two different column in my index based on the two column then only i can able to show the chart?

i can't able the solution.

is there any other option available?

kindly provide solution.

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [October 19, 2018, 3:48pm UTC](https://discuss.elastic.co/t/how-to-select-two-fields-on-the-same-index/153115/2 "2018-10-19T15:48:24Z")

</div>

I'm not quite sure what you mean by "select two fields on the same chart". Could you provide a screenshot and a more detailed explanation of what you're trying to do? Thanks!

---

<div class="post-metadata">

### Author: ![Nethaji](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nethaji/32/72803_2.png) [@Nethaji](https://discuss.elastic.co/u/Nethaji)
#### Post date: [October 20, 2018, 7:02am UTC](https://discuss.elastic.co/t/how-to-select-two-fields-on-the-same-index/153115/3 "2018-10-20T07:02:58Z")

</div>

i'm having this query in mysql.

select count(X) from Table1 where Y=1 and Z=1;

here i have two fields (X and Y) but in kibana there is no possible to select two fields i can able to select either Y or Z.

if i select one fields means i couldn't able to get the right answer

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [October 22, 2018, 4:24pm UTC](https://discuss.elastic.co/t/how-to-select-two-fields-on-the-same-index/153115/4 "2018-10-22T16:24:56Z")

</div>

Couldn't you use the "add a filter" to create two filters, one where Y is 1 and one where Z is 1? Or you could simply type in the query bar "Y:1 AND Z:1".

---

<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: [November 19, 2018, 4:35pm UTC](https://discuss.elastic.co/t/how-to-select-two-fields-on-the-same-index/153115/5 "2018-11-19T16:35:08Z")

</div>

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