# Max/min aggregation on timelion produces random roundings

**URL:** <https://discuss.elastic.co/t/max-min-aggregation-on-timelion-produces-random-roundings/202689>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [October 8, 2019, 2:39pm UTC](https://discuss.elastic.co/t/max-min-aggregation-on-timelion-produces-random-roundings/202689 "2019-10-08T14:39:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bloodhound123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bloodhound123/32/50610_2.png) [@bloodhound123](https://discuss.elastic.co/u/bloodhound123)\
**Post date:** [October 8, 2019, 2:39pm UTC](https://discuss.elastic.co/t/max-min-aggregation-on-timelion-produces-random-roundings/202689/1 "2019-10-08T14:39:01Z")

</div>

Hi,

I am using timelion to retrieve and max and min "Time" values from subbuckets that I am creating. To keep it simple I am creating buckets with 2 log entries in it. When I compute the min/max of a "number" field the value that I see on timelion is different from the value that I see on the log entry.

field that I am trying to aggregate on

LogEntry 1 : has the value "param.Time : 1931838479.51886"  
LogEntry 2 : has the value "param.Time : 1931838518.69142"

I would expect the "metric:max:param.Time" for these two logs in a bucket to produce 1931838480. However I see a value 1931838464

I have tried computing this across different buckets and I dont see a pattern of the values ( when compared to the expected value ).

Any help/pointers in this regard will be very helpful.

Regards

---

<div class="post-metadata">

**Author:** ![bloodhound123](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bloodhound123/32/50610_2.png) [@bloodhound123](https://discuss.elastic.co/u/bloodhound123)\
**Post date:** [October 8, 2019, 10:46pm UTC](https://discuss.elastic.co/t/max-min-aggregation-on-timelion-produces-random-roundings/202689/2 "2019-10-08T22:46:12Z")

</div>

To add to this query, when I use a "date" type field on the exact same log buckets I get the correct value. Its only with "number" type field that I see this random rounding issue.

---

<div class="post-metadata">

**Author:** ![Aaron\_Caldwell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron_caldwell/32/45755_2.png) [@Aaron\_Caldwell](https://discuss.elastic.co/u/Aaron_Caldwell)\
**Post date:** [October 9, 2019, 8:19pm UTC](https://discuss.elastic.co/t/max-min-aggregation-on-timelion-produces-random-roundings/202689/3 "2019-10-09T20:19:32Z")

</div>

Hello,

It looks like there's an open issue to add some clarity around the precision of Timelion values [here](https://github.com/elastic/kibana/issues/26100). Would you be willing to comment on this issue?

Regards,  
Aaron

---

<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:** [November 6, 2019, 8:19pm UTC](https://discuss.elastic.co/t/max-min-aggregation-on-timelion-produces-random-roundings/202689/4 "2019-11-06T20:19:37Z")

</div>

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