# How to derive final data from subset as an input?

**URL:** <https://discuss.elastic.co/t/how-to-derive-final-data-from-subset-as-an-input/107494>\
**Category:** Kibana\
**Created:** [November 14, 2017, 6:23am UTC](https://discuss.elastic.co/t/how-to-derive-final-data-from-subset-as-an-input/107494 "2017-11-14T06:23:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amolagnihotri](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@amolagnihotri](https://discuss.elastic.co/u/amolagnihotri)\
**Post date:** [November 14, 2017, 6:23am UTC](https://discuss.elastic.co/t/how-to-derive-final-data-from-subset-as-an-input/107494/1 "2017-11-14T06:23:38Z")

</div>

From a set of data (say, Parent Set), we want to extract a subset of data (say, ColumnSet) which will be a column with multiple records and then again get all the data using that column(Column Set).

---

<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:** [November 14, 2017, 8:54pm UTC](https://discuss.elastic.co/t/how-to-derive-final-data-from-subset-as-an-input/107494/2 "2017-11-14T20:54:15Z")

</div>

Can you provide some more information about the data and expected result? I'm not following your example. Please include some JSON that represents what you have stored in elasticsearch and perhaps an example of what from that data you want to visualize.

If you don't have data in elasticsearch yet, please just provide more information about the data you do have and the expected result

---

<div class="post-metadata">

**Author:** ![amolagnihotri](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@amolagnihotri](https://discuss.elastic.co/u/amolagnihotri)\
**Post date:** [November 15, 2017, 7:15am UTC](https://discuss.elastic.co/t/how-to-derive-final-data-from-subset-as-an-input/107494/3 "2017-11-15T07:15:28Z")

</div>

As an example I have two sets of an employee data

1. ![Employee Details](https://us1.discourse-cdn.com/elastic/original/3X/f/5/f55d6340210d8464a208e72db50b23116bf31532.jpg)  
{  
"query": {  
"match": {  
"\_type": {  
"query": "employee\_data",  
"type": "phrase"  
}  
}  
}  
}
2. ![Insurance Policy Details](https://us1.discourse-cdn.com/elastic/original/3X/6/7/67609e904e0b85290ef2528786166643cf5ca0a4.jpg)  
{  
"query": {  
"match": {  
"\_type": {  
"query": "insurance\_policy\_details",  
"type": "phrase"  
}  
}  
}  
}

To create a visualization I need a data which has some columns of "employee\_data" and some of "insurance\_policy\_details". Data set I require within Discover tab is

 ![All Details for Employees with Verified Status](https://us1.discourse-cdn.com/elastic/original/3X/c/1/c164341d84cb61b8094ce125e163f64f6a10d09d.jpg)

Please Note:

1. I need data only for the employees with "document Status: Verified"
2. I need all the insurance policies associated with every individual.

Thanks

---

<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:** [December 13, 2017, 7:15am UTC](https://discuss.elastic.co/t/how-to-derive-final-data-from-subset-as-an-input/107494/4 "2017-12-13T07:15:53Z")

</div>

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