# Filtering Data based on previous input selected

**URL:** <https://discuss.elastic.co/t/filtering-data-based-on-previous-input-selected/132658>\
**Category:** Kibana\
**Created:** [May 21, 2018, 12:54pm UTC](https://discuss.elastic.co/t/filtering-data-based-on-previous-input-selected/132658 "2018-05-21T12:54:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahadevgd](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@sahadevgd](https://discuss.elastic.co/u/sahadevgd)\
**Post date:** [May 21, 2018, 12:54pm UTC](https://discuss.elastic.co/t/filtering-data-based-on-previous-input-selected/132658/1 "2018-05-21T12:54:07Z")

</div>

Hi Team,

Kibana Version - 6.2.3

I'm working on a dashboard where i would need to first select a couple of parameters using the `Controls` visualization and based on those inputs, the dashboard should be displayed. For example -

I have two parameters - Application and Environment  
Application 'AAA' has environments L1, L2, L3  
Application 'BBB' has environments M1, M2, M3, M4

When i first select the application choice and select 'AAA', my second choice - environment should automatically show that it only has L1, L2, L3. And when i chose let's say, L2, the below graphs should be filtered based on these parameters. Is it possible ? kindly help.

I have one choice parameter and it's working as expected, but how can this be done when we have one second choice is dependent on the first one?

Thanks,  
Sahadev

---

<div class="post-metadata">

**Author:** ![christophilus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophilus/32/42991_2.png) [@christophilus](https://discuss.elastic.co/u/christophilus)\
**Post date:** [May 21, 2018, 2:03pm UTC](https://discuss.elastic.co/t/filtering-data-based-on-previous-input-selected/132658/2 "2018-05-21T14:03:12Z")

</div>

Hi Sahadev,

This is, indeed possible (at least in the latest version of Kibana). Let's say you've modeled your data to look something like this:

```auto
{
  "application": "AAA",
  "environments": ["L1", "L2", "L3"]
}

```

You simply have to specify the "Parent control" field as I have done below (although, here, I called my "environment" property "stuff" which is hardy useful...):

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/6/46b79d5ae1a9b51c24bae6b07b7c51da5a1c41d1.png)

---

<div class="post-metadata">

**Author:** ![sahadevgd](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@sahadevgd](https://discuss.elastic.co/u/sahadevgd)\
**Post date:** [May 21, 2018, 2:16pm UTC](https://discuss.elastic.co/t/filtering-data-based-on-previous-input-selected/132658/3 "2018-05-21T14:16:45Z")

</div>

Hi Chris,

Thanks for the response. I understood the logic behind this now.

But, I don't see "Parent control" field when i add my second parameter into the list. how can i get this ?

Kibana verison - 6.2.3

My data that i feed will be like below -

ApplicationName,Environment,Status,Code  
AAA,L1,200,UP  
AAA,L2,200,UP  
AAA,L3,200,UP  
BBB,M1,200,UP  
BBB,M2,404,DOWN  
BBB,M3,200,UP  
BBB,M4,500,DOWN

I have to get these fields and take the data accordingly.

---

<div class="post-metadata">

**Author:** ![christophilus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christophilus/32/42991_2.png) [@christophilus](https://discuss.elastic.co/u/christophilus)\
**Post date:** [May 21, 2018, 6:18pm UTC](https://discuss.elastic.co/t/filtering-data-based-on-previous-input-selected/132658/4 "2018-05-21T18:18:27Z")

</div>

Ah. Well, I have good news, and I have bad news.

The good news is that we support this in Kibana 6.3.x, and you can have flattened documents like the ones you seem to have (rather than the nested ones I suggested). The bad news is, that "Parent control" is not available in 6.2.x.

---

<div class="post-metadata">

**Author:** ![sahadevgd](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@sahadevgd](https://discuss.elastic.co/u/sahadevgd)\
**Post date:** [May 22, 2018, 9:54am UTC](https://discuss.elastic.co/t/filtering-data-based-on-previous-input-selected/132658/5 "2018-05-22T09:54:26Z")

</div>

Ah ok.

Thanks Chris. Will upgrade my ELK stack to 6.3.x and work on it.

---

<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:** [June 19, 2018, 10:08am UTC](https://discuss.elastic.co/t/filtering-data-based-on-previous-input-selected/132658/6 "2018-06-19T10:08:59Z")

</div>

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