# Filtering in lists in Bar chart

**URL:** <https://discuss.elastic.co/t/filtering-in-lists-in-bar-chart/317673>\
**Category:** Kibana\
**Created:** [October 28, 2022, 10:46am UTC](https://discuss.elastic.co/t/filtering-in-lists-in-bar-chart/317673 "2022-10-28T10:46:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [October 28, 2022, 10:46am UTC](https://discuss.elastic.co/t/filtering-in-lists-in-bar-chart/317673/1 "2022-10-28T10:46:01Z")

</div>

Hi all,

I'm trying to filter values in lists in Bar charts.

But I end up displaying all values of list in Bar Charts

Example:

Here I'm trying to filter with language - English

Below field with list:

```auto
contentepisodes_ref.title
{
  "language": "Hindi",
  "text": "मास्टर होम डिजाइन"
},
{
  "language": "English",
  "text": "Master Home Design"
}

```

 ![Screenshot 2022-10-28 at 4.13.59 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/6/66a5e8f10ea56c9ac6c4ca84dc54c5a3b0a8dc59.png)

Now I filter with only English, but still end showing both values of list.

Anyway I can only show English i.e one of the values of the list.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [November 3, 2022, 5:30pm UTC](https://discuss.elastic.co/t/filtering-in-lists-in-bar-chart/317673/2 "2022-11-03T17:30:04Z")

</div>

The filter only works in the context of the document. so if a document has that value on the field, it will be included in the aggregation. The solution would be not to have a nested field, something like:  
contentepisodes\_ref.english\_title: "..."  
contentepisoded\_ref.hindi\_title:"..."  
and then just do the aggregation on the specific language field or to split the initial documents into 2 documents, one with the hindi and another with the english title.

---

<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 1, 2022, 5:30pm UTC](https://discuss.elastic.co/t/filtering-in-lists-in-bar-chart/317673/3 "2022-12-01T17:30:26Z")

</div>

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