# Kibana Filter is not working

**URL:** <https://discuss.elastic.co/t/kibana-filter-is-not-working/227923>\
**Category:** Kibana\
**Created:** [April 14, 2020, 1:29pm UTC](https://discuss.elastic.co/t/kibana-filter-is-not-working/227923 "2020-04-14T13:29:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nages](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nages/32/46943_2.png) [@nages](https://discuss.elastic.co/u/nages)\
**Post date:** [April 14, 2020, 1:29pm UTC](https://discuss.elastic.co/t/kibana-filter-is-not-working/227923/1 "2020-04-14T13:29:03Z")

</div>

I applied a filter : category.keyword: Men's Shoes . However, the widget "[eCommerce] Sales by Category" still shows other categories as well. What is the reasoning behind this .

Check out here ,and see the widget "[eCommerce] Sales by Category" , there are other categories displayed too apart from the chosen category.

> [Elastic Demos](https://demo.elastic.co/app/kibana#/dashboard/722b74f0-b882-11e8-a6d9-e546fe2bba5f?_g=(filters:!(),refreshInterval:(pause:!f,value:900000),time:(from:now-7d,to:now)))&\_a=(description:'Analyze%20mock%20eCommerce%20orders%20and%20revenue',filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:ff959d40-b880-11e8-a6d9-e546fe2bba5f,key:category.keyword,negate:!f,params:(query:'Men!'s%20Shoes'),type:phrase),query:(match:(category.keyword:(query:'Men!'s%20Shoes',type:phrase))))),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(vis:(colors:('Men!'s%20Accessories':%2382B5D8,'Men!'s%20Clothing':%23F9BA8F,'Men!'s%20Shoes':%23F29191,'Women!'s%20Accessories':%23F4D598,'Women!'s%20Clothing':%2370DBED,'Women!'s%20Shoes':%23B7DBAB))),gridData:(h:10,i:'1',w:36,x:12,y:18),id:'37cc8650-b882-11e8-a6d9-e546fe2bba5f',panelIndex:'1',type:visualization,version:'7.5.1'),(embeddableConfig:(vis:(colors:(FEMALE:%236ED0E0,MALE:%23447EBC),legendOpen:!f)),gridData:(h:11,i:'2',w:12,x:12,y:7),id:ed8436b0-b88b-11e8-a6d9-e546fe2bba5f,panelIndex:'2',type:visualization,version:'7.5.1'),(embeddableConfig:(),gridData:(h:7,i:'3',w:18,x:0,y:0),id:'09ffee60-b88c-11e8-a6d9-e546fe2bba5f',panelIndex:'3',type:visualization,version:'7.5.1'),(embeddableConfig:(),gridData:(h:7,i:'4',w:30,x:18,y:0),id:'1c389590-b88d-11e8-a6d9-e546fe2bba5f',panelIndex:'4',type:visualization,version:'7.5.1'),(embeddableConfig:(),gridData:(h:11,i:'5',w:48,x:0,y:28),id:'45e07720-b890-11e8-a6d9-e546fe2bba5f',panelIndex:'5',type:visualization,version:'7.5.1'),(embeddableConfig:(),gridData:(h:10,i:'6',w:12,x:0,y:18),id:'10f1a240-b891-11e8-a6d9-e546fe2bba5f',panelIndex:'6',type:visualization,version:'7.5.1'),(embeddableConfig:(),gridData:(h:11,i:'7',w:12,x:0,y:7),id:b80e6540-b891-11e8-a6d9-e546fe2bba5f,panelIndex:'7',type:visualization,version:'7.5.1'),(embeddableConfig:(vis:(colors:('0%20-%2050':%23E24D42,'50%20-%2075':%23EAB839,'75%20-%20100':%237EB26D),defaultColors:('0%20-%2050':'rgb(165,0,38)','50%20-%2075':'rgb(255,255,190)','75%20-%20100':'rgb(0,104,55)'),legendOpen:!f)),gridData:(h:11,i:'8',w:12,x:24,y:7),id:'4b3ec120-b892-11e8-a6d9-e546fe2bba5f',panelIndex:'8',type:visualization,version:'7.5.1'),(embeddableConfig:(vis:(colors:('0%20-%202':%23E24D42,'2%20-%203':%23F2C96D,'3%20-%204':%239AC48A),defaultColors:('0%20-%202':'rgb(165,0,38)','2%20-%203':'rgb(255,255,190)','3%20-%204':'rgb(0,104,55)'),legendOpen:!f)),gridData:(h:11,i:'9',w:12,x:36,y:7),id:'9ca7aa90-b892-11e8-a6d9-e546fe2bba5f',panelIndex:'9',type:visualization,version:'7.5.1'),(embeddableConfig:(),gridData:(h:18,i:'10',w:48,x:0,y:54),id:'3ba638e0-b894-11e8-a6d9-e546fe2bba5f',panelIndex:'10',type:search,version:'7.5.1'),(embeddableConfig:(isLayerTOCOpen:!f,mapCenter:(lat:45.88578,lon:-15.07605,zoom:2.11),openTOCDetails:!()),gridData:(h:15,i:'11',w:24,x:0,y:39),id:'2c9c1f60-1909-11e9-919b-ffe5949a18d2',panelIndex:'11',type:map,version:'7.5.1'),(embeddableConfig:(),gridData:(h:15,i:'12',w:24,x:24,y:39),id:b72dd430-bb4d-11e8-9c84-77068524bcab,panelIndex:'12',type:visualization,version:'7.5.1')),query:(language:kuery,query:''),timeRestore:!t,title:'%5BeCommerce%5D%20Revenue%20Dashboard',viewMode:view)

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [April 14, 2020, 2:00pm UTC](https://discuss.elastic.co/t/kibana-filter-is-not-working/227923/2 "2020-04-14T14:00:13Z")

</div>

category is an array field - a single document can contain multiple categories. This is the case because one document in the ecommerce sample data set is one order - and there can be products from multiple categories in a single order.

If you go to discover and look at the category column you can see this as well:

 ![Screenshot 2020-04-14 at 15.57.51](https://us1.discourse-cdn.com/elastic/original/3X/b/e/bef8d110d83b2350cf496861d1d6a53233a06a87.png)

If you would now filter by `category: Women's Clothing`, then order `567365` (the fourth from the top) would still show up because it matches that filter while having a category of `Women's Shoes` as well.

---

<div class="post-metadata">

**Author:** ![nages](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nages/32/46943_2.png) [@nages](https://discuss.elastic.co/u/nages)\
**Post date:** [April 14, 2020, 2:16pm UTC](https://discuss.elastic.co/t/kibana-filter-is-not-working/227923/3 "2020-04-14T14:16:17Z")

</div>

so, you mean this is expected behavior for some "charts" like these area charts where nailing down and then getting the changes reflected in the chart "Not possible" considering the holistic view.

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [April 14, 2020, 2:56pm UTC](https://discuss.elastic.co/t/kibana-filter-is-not-working/227923/4 "2020-04-14T14:56:58Z")

</div>

It's expected behavior, yes - this is the mental model of Elasticsearch filters.

I see why this is confusing on first sight - it's always important to keep in mind what your data actually means and how to structure it. You can avoid this possible mismatch by structuring your data to avoid array fields.

---

<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:** [May 12, 2020, 2:57pm UTC](https://discuss.elastic.co/t/kibana-filter-is-not-working/227923/5 "2020-05-12T14:57:09Z")

</div>

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