# Fiter and display field value from two indexes

**URL:** https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249
**Category:** Kibana
**Created:** [May 10, 2024, 10:08am UTC](https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249 "2024-05-10T10:08:18Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![cnu](https://avatars.discourse-cdn.com/v4/letter/c/85e7bf/32.png) [@cnu](https://discuss.elastic.co/u/cnu)
#### Post date: [May 10, 2024, 10:08am UTC](https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249/1 "2024-05-10T10:08:18Z")

</div>

I want to filter the field value from two indexes and visualise in kibana

say I have field problem which is specified multiple times in a file with some number(this will change)  
example- problem: 16 similarly in other index with some other (like problem:10)

Now I need to see it in kibana dashboard with problem:\<value(16/10\> instead of number of times the word problem is repeated

---

<div class="post-metadata">

### Author: ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)
#### Post date: [May 10, 2024, 2:35pm UTC](https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249/2 "2024-05-10T14:35:04Z")

</div>

Thanks for reaching out, @cnu. How is your data being stored? Are you using an index pattern? How are you aggregating the data in the visualization?

One approach could be to create an index pattern such as `problem-*.` From there, you can configure aggregation in your dashboard by selecting the index pattern you've made. Then, choose an X-axis or Split Series aggregation, and select a Terms aggregation, and set it to use the `problem` field. For the Y-axis aggregation, configure it to "Max" or another metric such as "Average" or "Min," and choose the `problem` field. From there, you can adjust the visualization to your preferences.

---

<div class="post-metadata">

### Author: ![cnu](https://avatars.discourse-cdn.com/v4/letter/c/85e7bf/32.png) [@cnu](https://discuss.elastic.co/u/cnu)
#### Post date: [May 11, 2024, 10:35am UTC](https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249/3 "2024-05-11T10:35:47Z")

</div>

Thanks for the reply. I am new here, uploaded 2 log files and and created index patterns from them. could you help me with more info to proceed.

---

<div class="post-metadata">

### Author: ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)
#### Post date: [May 13, 2024, 6:03pm UTC](https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249/4 "2024-05-13T18:03:43Z")

</div>

Thanks, @cnu. Creating an index pattern is the first step for combining two indexes.

Do you have a screenshot of what you are seeing? What are you expecting to see here verses what you are seeing? Are you getting any errors when you try to aggregation to your dashboard?

Here are some resources that may be helpful here:

- [Create your first dashboard | Kibana Guide [8.13] | Elastic](https://www.elastic.co/guide/en/kibana/current/create-a-dashboard-of-panels-with-web-server-data.html)
- [Aggregation-based | Kibana Guide [8.13] | Elastic](https://www.elastic.co/guide/en/kibana/current/add-aggregation-based-visualization-panels.html)
- [Visualization from two indexes](https://discuss.elastic.co/t/visualization-from-two-indexes/210308)

---

<div class="post-metadata">

### Author: ![cnu](https://avatars.discourse-cdn.com/v4/letter/c/85e7bf/32.png) [@cnu](https://discuss.elastic.co/u/cnu)
#### Post date: [May 14, 2024, 4:40am UTC](https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249/5 "2024-05-14T04:40:48Z")

</div>

I am able to combine indexes and was able to visualise a vertical graph . I can see the top values from index on horizontal axis, in the vertical I need to display the field value which is 16(from problems: 16) here I am able to see the count of problems instead of the field value 16.

---

<div class="post-metadata">

### Author: ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)
#### Post date: [May 14, 2024, 10:16pm UTC](https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249/6 "2024-05-14T22:16:50Z")

</div>

Thanks for following up. How is your X-axis configured? Have you tried using a terms aggregation here?

You can use metric aggregation for the Y-axis. If you want to visualize a specific metric (like average, sum, max, or min) of the problems field, choose the appropriate aggregation type under the Y-axis section. For example, if problems store numeric values and you want to show the sum or average, select "Sum" or "Average" and specify the `problems` field.

---

<div class="post-metadata">

### Author: ![cnu](https://avatars.discourse-cdn.com/v4/letter/c/85e7bf/32.png) [@cnu](https://discuss.elastic.co/u/cnu)
#### Post date: [May 15, 2024, 12:31pm UTC](https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249/7 "2024-05-15T12:31:21Z")

</div>

yes, using metric aggragation tried to setup since the problems field varies sum,average,count is not working as expected I need to display the value displayed for problems instead of the number of times the problems word used/repeated in file/index.

---

<div class="post-metadata">

### Author: ![jessgarson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jessgarson/32/129841_2.png) [@jessgarson](https://discuss.elastic.co/u/jessgarson)
#### Post date: [May 15, 2024, 2:33pm UTC](https://discuss.elastic.co/t/fiter-and-display-field-value-from-two-indexes/359249/8 "2024-05-15T14:33:44Z")

</div>

Thanks, @cnu. Do you have a screenshot of your dashboard configureation you can share?
