# How to Compare Data from 2 indices in same visualization?

**URL:** <https://discuss.elastic.co/t/how-to-compare-data-from-2-indices-in-same-visualization/247665>\
**Category:** Kibana\
**Created:** [September 6, 2020, 9:50am UTC](https://discuss.elastic.co/t/how-to-compare-data-from-2-indices-in-same-visualization/247665 "2020-09-06T09:50:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishesh1](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@vishesh1](https://discuss.elastic.co/u/vishesh1)\
**Post date:** [September 6, 2020, 9:50am UTC](https://discuss.elastic.co/t/how-to-compare-data-from-2-indices-in-same-visualization/247665/1 "2020-09-06T09:50:22Z")

</div>

Hi,  
I am new to elastic stack, so please excuse the incorrect terminologies if any.

I am indexing some data from a csv file to elasticsearch using one index "build1", which contains some performance data for my software like max fps etc for a particular build of my software. I am able to successfully plot this data on a visualization using a 'line' visualization in Kibana.  
Now for a newer build of my software, I have another set of data which I am indexing under another index "build2". I want to plot this data over the same visualization and see the difference in performance graphically.

Also, this will be repeated 5-6 times for one release cycle of my software. So I'm looking to plot this data 5-6 times over the same visualization.  
Is this possible in Kibana? Should I be using another kind of visualization?  
Please let me know if you think there can be a better way to do this in Kibana.

Elasticsearch and Kibana Version - 6.8  
Thanks

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [September 6, 2020, 10:26am UTC](https://discuss.elastic.co/t/how-to-compare-data-from-2-indices-in-same-visualization/247665/2 "2020-09-06T10:26:26Z")

</div>

This should be possible  
I guess boths indexes build1 and build2 have the same fields  
Yu can create an index pattern build\* that point to all index and visualize from that index pattern

---

<div class="post-metadata">

**Author:** ![vishesh1](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@vishesh1](https://discuss.elastic.co/u/vishesh1)\
**Post date:** [September 7, 2020, 1:14am UTC](https://discuss.elastic.co/t/how-to-compare-data-from-2-indices-in-same-visualization/247665/3 "2020-09-07T01:14:40Z")

</div>

Thanks @ylasri I will try that.

---

<div class="post-metadata">

**Author:** ![vishesh1](https://avatars.discourse-cdn.com/v4/letter/v/ebca7d/32.png) [@vishesh1](https://discuss.elastic.co/u/vishesh1)\
**Post date:** [September 7, 2020, 8:27am UTC](https://discuss.elastic.co/t/how-to-compare-data-from-2-indices-in-same-visualization/247665/4 "2020-09-07T08:27:46Z")

</div>

Just Posting the solution I found.  
I didn't need to make a separate index for build2. I just added another field in the dataset "build-info" as keyword. It was then easy to "split series" according to another build. This method works for multiple build values too.

---

<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:** [October 5, 2020, 8:27am UTC](https://discuss.elastic.co/t/how-to-compare-data-from-2-indices-in-same-visualization/247665/5 "2020-10-05T08:27:51Z")

</div>

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