# SUM aggregation result off by a factor of 10?

**URL:** <https://discuss.elastic.co/t/sum-aggregation-result-off-by-a-factor-of-10/126315>\
**Category:** Kibana\
**Created:** [March 31, 2018, 11:33am UTC](https://discuss.elastic.co/t/sum-aggregation-result-off-by-a-factor-of-10/126315 "2018-03-31T11:33:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSM](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@DSM](https://discuss.elastic.co/u/DSM)\
**Post date:** [March 31, 2018, 11:33am UTC](https://discuss.elastic.co/t/sum-aggregation-result-off-by-a-factor-of-10/126315/1 "2018-03-31T11:33:54Z")

</div>

Im amending the Metricbeats data rate visualization to calculate bandwidth rates from my netflow data.

I think ive got the right fields calculated (below), but my results values x10 what they should be.

 ![sum](https://us1.discourse-cdn.com/elastic/original/3X/7/a/7a404733c467582bef37c74fbc9e707a680a51e4.PNG)

I'm setting the flow data manually, so i know these should be 1MBs / 4MBs / 8MBs. Below a timelion chart showing the right values.

 ![graph](https://us1.discourse-cdn.com/elastic/original/3X/d/d/dd21c625167f8abac3aa4bbfd29aed5b080d1b27.png)

Any idea why my metric numbers are off?

---

<div class="post-metadata">

**Author:** ![DSM](https://avatars.discourse-cdn.com/v4/letter/d/cc9497/32.png) [@DSM](https://discuss.elastic.co/u/DSM)\
**Post date:** [March 31, 2018, 1:57pm UTC](https://discuss.elastic.co/t/sum-aggregation-result-off-by-a-factor-of-10/126315/2 "2018-03-31T13:57:12Z")

</div>

I think i've hacked this by adding the Calculation:

variable nbytes = Sum of netflow.bytes

params.nbytes / 10

But this seems a bit of a cheat

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [April 3, 2018, 2:27pm UTC](https://discuss.elastic.co/t/sum-aggregation-result-off-by-a-factor-of-10/126315/3 "2018-04-03T14:27:40Z")

</div>

Are you using the bytes formatter (in the options tab)? Is the result as expected with this switched off?

---

<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 1, 2018, 2:28pm UTC](https://discuss.elastic.co/t/sum-aggregation-result-off-by-a-factor-of-10/126315/4 "2018-05-01T14:28:12Z")

</div>

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