# Rounding off values to CEIL in JSON Inline

**URL:** <https://discuss.elastic.co/t/rounding-off-values-to-ceil-in-json-inline/80901>\
**Category:** Kibana\
**Created:** [April 1, 2017, 6:04pm UTC](https://discuss.elastic.co/t/rounding-off-values-to-ceil-in-json-inline/80901 "2017-04-01T18:04:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishalkin](https://avatars.discourse-cdn.com/v4/letter/v/ccd318/32.png) [@vishalkin](https://discuss.elastic.co/u/vishalkin)\
**Post date:** [April 1, 2017, 6:04pm UTC](https://discuss.elastic.co/t/rounding-off-values-to-ceil-in-json-inline/80901/1 "2017-04-01T18:04:57Z")

</div>

I have an integer field in a metric and in its JSON Inline I have a calculated field (stop\_time-start\_time) and the value of a calculated field is a float value. But somehow I am getting only an integer part of that value and not float. Also an integer is always a floor value. (The output is always an integer may be because the field used for metric is of type integer).

ex:

> 1.4 = 1  
> 1.9 = 1  
> 0.7 = 0

How can I change it to float or if not then atleat make it CEIL. because I dont want to show the field value as 0 (zero).

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [April 3, 2017, 4:54pm UTC](https://discuss.elastic.co/t/rounding-off-values-to-ceil-in-json-inline/80901/2 "2017-04-03T16:54:55Z")

</div>

Can you check the mappings for that field? If elasticsearch thinks it's an integer that could be why it's dropping the decimal

---

<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, 2017, 4:54pm UTC](https://discuss.elastic.co/t/rounding-off-values-to-ceil-in-json-inline/80901/3 "2017-05-01T16:54:59Z")

</div>

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