Float numbers from Elasticsearch are transformed when used as grafana variable

I have a series of float numbers in my ES database that look like following:
99.6
87.56
However when I use these entries as variables in Grafana, it’s increasing the number of decimals and they are converted into somthing like:
99.675412345
87.56871240937
So to sum up it’s increasing “accuracy” of the numbers it gets from ES.
How to “round it up” to 2 decimals only?

Hi there,

to achieve that, just use the Regex column and fill with this /(\d*\.\d\d)\d*/ but this is not round up, just truncate to 2 decimals.

Let me know what’s the result.

Regards,
Fadjar Tandabawana

Hi @fadjar340,

It works fine :slight_smile: Thanks!¨

/Marcin