# Store data - Write $ and € in an integer

**URL:** <https://discuss.elastic.co/t/store-data-write-and-in-an-integer/184526>\
**Category:** Elasticsearch\
**Created:** [June 6, 2019, 8:37am UTC](https://discuss.elastic.co/t/store-data-write-and-in-an-integer/184526 "2019-06-06T08:37:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![simple\_commentateur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simple_commentateur/32/45428_2.png) [@simple\_commentateur](https://discuss.elastic.co/u/simple_commentateur)\
**Post date:** [June 6, 2019, 8:37am UTC](https://discuss.elastic.co/t/store-data-write-and-in-an-integer/184526/1 "2019-06-06T08:37:42Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![BennyInc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bennyinc/32/21751_2.png) [@BennyInc](https://discuss.elastic.co/u/BennyInc)\
**Post date:** [June 6, 2019, 8:55am UTC](https://discuss.elastic.co/t/store-data-write-and-in-an-integer/184526/2 "2019-06-06T08:55:39Z")

</div>

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](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/](http://numeraljs.com/)

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

---

<div class="post-metadata">

**Author:** ![BennyInc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bennyinc/32/21751_2.png) [@BennyInc](https://discuss.elastic.co/u/BennyInc)\
**Post date:** [June 6, 2019, 9:01am UTC](https://discuss.elastic.co/t/store-data-write-and-in-an-integer/184526/3 "2019-06-06T09:01:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![simple\_commentateur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simple_commentateur/32/45428_2.png) [@simple\_commentateur](https://discuss.elastic.co/u/simple_commentateur)\
**Post date:** [June 6, 2019, 9:16am UTC](https://discuss.elastic.co/t/store-data-write-and-in-an-integer/184526/4 "2019-06-06T09:16:29Z")

</div>

Thanks a lot !

---

<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:** [July 4, 2019, 9:27am UTC](https://discuss.elastic.co/t/store-data-write-and-in-an-integer/184526/5 "2019-07-04T09:27:47Z")

</div>

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