# Rounding error in lens sum aggregation (8.12.1)

**URL:** <https://discuss.elastic.co/t/rounding-error-in-lens-sum-aggregation-8-12-1/355141>\
**Category:** Kibana\
**Tags:** lens, aggregations\
**Created:** [March 11, 2024, 9:36am UTC](https://discuss.elastic.co/t/rounding-error-in-lens-sum-aggregation-8-12-1/355141 "2024-03-11T09:36:36Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [March 11, 2024, 7:51pm UTC](https://discuss.elastic.co/t/rounding-error-in-lens-sum-aggregation-8-12-1/355141/5 "2024-03-11T19:51:35Z")

</div>

@Jim_Panzee

In Discover, open up the document and look at the actual JSON and Fields see if they all show the exact values...

Discover does some niceties in the table sometimes...

I ran into something like this a while back and see if I can find it... that turned out to be actually a JSON issue... Floating Point representation in JSON...

I will see if I can find the issue I saw before ... may not be the same but was similar.

> [@Float type rounding issues](https://discuss.elastic.co/t/float-type-rounding-issues/321859/6):
>
> (please try not to paste text as images... hard to see, help, debug etc...etc. paste as formatted text) But YUP You need to use a double as the type not float as you are exceeding the significant digits of a single precision float Also you are confusing the \_source (what comes in the source json) and the fields what is index stored and showed in the Discover, Visualizations.. etc Here follow along What you have now PUT discuss-test/ { "mappings" : { "properties": { "@timestamp": { …

---

_[View the full topic](https://discuss.elastic.co/t/rounding-error-in-lens-sum-aggregation-8-12-1/355141)._
