# Aggregation not working in visualization

**URL:** https://discuss.elastic.co/t/aggregation-not-working-in-visualization/254250
**Category:** Kibana
**Created:** [November 4, 2020, 10:42am UTC](https://discuss.elastic.co/t/aggregation-not-working-in-visualization/254250 "2020-11-04T10:42:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)
#### Post date: [November 4, 2020, 10:42am UTC](https://discuss.elastic.co/t/aggregation-not-working-in-visualization/254250/1 "2020-11-04T10:42:33Z")

</div>

Hi Team,  
Greetings..! Hope you are doing good.  
In dev tools tab, when I execute the terms aggs query for a certain field I can retrieve the result based on the values in that field, but when I do the same terms aggregation in visualization tab, I can get results under missing key only. Consider when I execute the query in dev tools, I can get 50 documents under Google, 50 under Yahoo.  
But when I do the same in visualization tab, I can get all 100 documents under missing field only.  
Kindly help me on the above query. Many thanks in advance.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 4, 2020, 1:00pm UTC](https://discuss.elastic.co/t/aggregation-not-working-in-visualization/254250/2 "2020-11-04T13:00:05Z")

</div>

I moved the question to #elastic-stack:kibana. May be share a screen capture of what you are saying?

---

<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: [November 4, 2020, 2:53pm UTC](https://discuss.elastic.co/t/aggregation-not-working-in-visualization/254250/3 "2020-11-04T14:53:31Z")

</div>

Can you show a screenshot of your chart configuration and copy/paste the mapping of your index here?

---

<div class="post-metadata">

### Author: ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)
#### Post date: [November 5, 2020, 5:05am UTC](https://discuss.elastic.co/t/aggregation-not-working-in-visualization/254250/4 "2020-11-05T05:05:59Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc01c03ad20e4e8e7a0dd8892f5e4da790d5ff8d.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/b/9b8d093aa465d4a5a8777667c9259e4d18bacb34.png)

Hi team,  
I have added the screenshots for your reference. Please let me know if you have any queries. Also I have parent child mapping and this is parent field with keyword mapping.  
Thanks in advance.

---

<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: [November 5, 2020, 8:14am UTC](https://discuss.elastic.co/t/aggregation-not-working-in-visualization/254250/5 "2020-11-05T08:14:28Z")

</div>

Hey, some questions:

- Do you have "other bucket" enabled for your terms aggregation?
- Are there opcodes containing a dash in your data set?
- Are there any filters set on the visualization?
- Could you please click the "Inspect" button in the top navigation bar of the visualization, switch to requests and copy/paste the requests being sent to Elasticsearch?

---

<div class="post-metadata">

### Author: ![gokulnath112](https://avatars.discourse-cdn.com/v4/letter/g/df788c/32.png) [@gokulnath112](https://discuss.elastic.co/u/gokulnath112)
#### Post date: [November 17, 2020, 8:25am UTC](https://discuss.elastic.co/t/aggregation-not-working-in-visualization/254250/6 "2020-11-17T08:25:18Z")

</div>

Hi team,  
thanks a ton for your support.  
I have resolved the issue.  
I chose the wrong time filter field. thats why i didn't get results.  
Once again thanks for your effort.

Thanks,  
Gokul

---

<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 15, 2020, 8:25am UTC](https://discuss.elastic.co/t/aggregation-not-working-in-visualization/254250/7 "2020-12-15T08:25:21Z")

</div>

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