# \[Question\] No field could be selected when try to sum an aggregation in the visualization

**URL:** <https://discuss.elastic.co/t/question-no-field-could-be-selected-when-try-to-sum-an-aggregation-in-the-visualization/370>\
**Category:** Kibana\
**Created:** [May 8, 2015, 4:26am UTC](https://discuss.elastic.co/t/question-no-field-could-be-selected-when-try-to-sum-an-aggregation-in-the-visualization/370 "2015-05-08T04:26:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gwan](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@Gwan](https://discuss.elastic.co/u/Gwan)\
**Post date:** [May 8, 2015, 4:26am UTC](https://discuss.elastic.co/t/question-no-field-could-be-selected-when-try-to-sum-an-aggregation-in-the-visualization/370/1 "2015-05-08T04:26:13Z")

</div>

Hi I'm new to Kibana. I follow the guidance and try to visualize a search, but meet some little problems.  
I got items like this:  
[![](https://cloud.githubusercontent.com/assets/11644714/7530203/02634c82-f577-11e4-98a5-791a86588209.png) ](https://cloud.githubusercontent.com/assets/11644714/7530203/02634c82-f577-11e4-98a5-791a86588209.png)  
I want to sum the "pos" section of all the items that have the same timestamp, however when I try to visualize, the web shows like this:  
[![](https://cloud.githubusercontent.com/assets/11644714/7530315/a88ef8b2-f578-11e4-9473-0b5e0a139670.png) ](https://cloud.githubusercontent.com/assets/11644714/7530315/a88ef8b2-f578-11e4-9473-0b5e0a139670.png)  
Nothing could be selected in the "Field" pull-down menu. What's my mistake?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 8, 2015, 8:07am UTC](https://discuss.elastic.co/t/question-no-field-could-be-selected-when-try-to-sum-an-aggregation-in-the-visualization/370/2 "2015-05-08T08:07:08Z")

</div>

Hi,

In order to perform the aggregation, the 'pos' field need to be mapped as a number. Go to the Discover mode and verify that this field is indeed mapped as a number (indicated by a '#' in front of the field) and not a string.

Christian

---

<div class="post-metadata">

**Author:** ![Gwan](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@Gwan](https://discuss.elastic.co/u/Gwan)\
**Post date:** [May 8, 2015, 9:55am UTC](https://discuss.elastic.co/t/question-no-field-could-be-selected-when-try-to-sum-an-aggregation-in-the-visualization/370/3 "2015-05-08T09:55:26Z")

</div>

Thanks for reply.  
I've checked the value type of the field, it appears to be two fields with 'long' type: the 'pos' and 'neg' field:  
 ![](https://sea2.discourse-cdn.com/elastic/uploads/default/174/feebd370e30b01ef.jpg)  
But when I used the Discover mode to list the items, there aren't any '#' in front of the field, just as the first picture I posted.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 8, 2015, 10:10am UTC](https://discuss.elastic.co/t/question-no-field-could-be-selected-when-try-to-sum-an-aggregation-in-the-visualization/370/4 "2015-05-08T10:10:25Z")

</div>

That is odd. Are you querying against a single index in Kibana or using a pattern to query against a set of indices? If you are using a pattern, is the 'pos' and 'neg' fields mapped as long in all underlying indices?

Christian

---

<div class="post-metadata">

**Author:** ![Gwan](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@Gwan](https://discuss.elastic.co/u/Gwan)\
**Post date:** [May 8, 2015, 10:34am UTC](https://discuss.elastic.co/t/question-no-field-could-be-selected-when-try-to-sum-an-aggregation-in-the-visualization/370/5 "2015-05-08T10:34:09Z")

</div>

My index is an index with multiple index\_type. All the relative items are put to a 'test' index\_type. When I visualize, I use a search pattern as "\_type:test" under the index.  
Is this a wrong way to deal? Next I will try to create a completely new index and see what will happen.

---

<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:** [July 6, 2017, 2:19pm UTC](https://discuss.elastic.co/t/question-no-field-could-be-selected-when-try-to-sum-an-aggregation-in-the-visualization/370/6 "2017-07-06T14:19:43Z")

</div>


