Store data - Write $ and € in an integer

Hello,

I see in the sample data ecommerce of Kibana that it's possible to store price with his device and it's still an integer, not a string.

How can i do that?

You would still store the number as an integer (without the suffix/prefix), but then change how Kibana displays it via number formatters on the field: https://www.elastic.co/guide/en/kibana/current/managing-fields.html

So if you have a field "price" you can specify the format to be '$0.00' for example. Documentation for the numeral.js formatting: http://numeraljs.com/

Unfortunately I found no way for Euro yet, but I guess that depends on the language file used.

For Euros the defaultLocale needs to be set correctly: https://github.com/elastic/kibana/issues/25371

Thanks a lot !

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