Float number rounding in Kibana

I have many documents with a floating field ("duration") representing the response time of a HTTP request in seconds. Its value is always smaller than one (example: 0.018). I want to visualize the average response times in kibana.

I am able to create a new visualization with the average value of the "duration" field. The problem is that it is always rounded to 0. I've also tried creating a scripted field using doc['duration'].value * 1000.0, but the value of the scripted field is also zero.

How could I calculate the average or, in general, work with small floating values in Kibana?
Thanks.

1 Like

Take a look at field formatters and see if that help? https://www.elastic.co/blog/kibana-4-1-field-formatters

Otherwise, what is the mapping you are using for the field in the doc?

Thanks @warkolm. The field is mapped as a number:
Ands I see it as a valid number:

It was my fault. I did something wrong because everything works fine now (after creating/removing the scripted field and having some sleep).

Sorry for wasting your time.

What was it that you were doing incorrectly?
I'm having the same issue as well, and have seen several queries online about this with no resolutions.

Thanks!

I'm sorry @sanaya but I don't know. I just removed the scripted field and created it again, and it started worked.