# Numeral.js custom format

**URL:** https://discuss.elastic.co/t/numeral-js-custom-format/29334
**Category:** Kibana
**Created:** [September 15, 2015, 5:13pm UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334 "2015-09-15T17:13:35Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)
#### Post date: [September 15, 2015, 5:13pm UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/1 "2015-09-15T17:13:35Z")

</div>

hi guys.

I am trying to figure out this Numeral.js. I want a "." as thousand operator and a "," to round numbers off.

Example of my number field: 100000. I want that to look like 1.000,00.

Possible?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 15, 2015, 10:31pm UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/2 "2015-09-15T22:31:24Z")

</div>

You can do that in the advanced settings part of KB, but be careful!

---

<div class="post-metadata">

### Author: ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)
#### Post date: [September 16, 2015, 9:37am UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/3 "2015-09-16T09:37:30Z")

</div>

Okay but where? All I see in advanced is "format:number:defaultPattern " - but that seems like a global version of what I can set per field, and nothing more.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [September 18, 2015, 10:15pm UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/4 "2015-09-18T22:15:55Z")

</div>

If you want to do that for a specific field, head to the index pattern settings and then edit that field.

---

<div class="post-metadata">

### Author: ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)
#### Post date: [September 19, 2015, 10:04am UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/5 "2015-09-19T10:04:17Z")

</div>

Let me rephrase: What should the Numeral.js format pattern look like to achieve this?

---

<div class="post-metadata">

### Author: ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)
#### Post date: [September 26, 2015, 5:51am UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/6 "2015-09-26T05:51:13Z")

</div>

It doesn't appear to be possible using Numeral.js, it assumes that period stands for beginning of the decimal points: [http://numeraljs.com/](http://numeraljs.com/)

---

<div class="post-metadata">

### Author: ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)
#### Post date: [September 26, 2015, 7:20am UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/7 "2015-09-26T07:20:55Z")

</div>

Hmm okay. Can i divide by 100, so I would end up with 1000,00?

---

<div class="post-metadata">

### Author: ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)
#### Post date: [September 26, 2015, 12:36pm UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/8 "2015-09-26T12:36:11Z")

</div>

Yes, you can divide the number by 100 using scripted fields. However, it still won't result in formatting you're looking for, with a decimal point being a comma.

Just so I understand what you are trying to do - are you trying to format a number in a locale-specific format for a specific country, where the decimal point is represented by a comma and a thousand point is represented by a dot?

---

<div class="post-metadata">

### Author: ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)
#### Post date: [September 28, 2015, 9:19am UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/9 "2015-09-28T09:19:06Z")

</div>

Yes that is what I am trying to do - in Denmark we use dot as thousand separator. But I am also trying to divide by 100 since the field is represented in cents, and I want it represented in "$,cents". So the raw 100000 is actually 1000$ and 00 cents, represented in Danish like 1.000,00.

---

<div class="post-metadata">

### Author: ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)
#### Post date: [October 10, 2015, 3:07pm UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/10 "2015-10-10T15:07:21Z")

</div>

Sorry about the delay in the response. I think this is an enhancement request - we should allow this sort of configuration in field formatters, which we don't today. Would you mind filing it here? [https://github.com/elastic/kibana/issues](https://github.com/elastic/kibana/issues)

---

<div class="post-metadata">

### Author: ![scaarup](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scaarup/32/4615_2.png) [@scaarup](https://discuss.elastic.co/u/scaarup)
#### Post date: [October 10, 2015, 6:31pm UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/11 "2015-10-10T18:31:22Z")

</div>

No worries. I have submitted an issue now.

I was thinking about a different approach to dividing my "amount" by 100. Is there a logstash filter-plugin, that can do math?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 11, 2015, 12:04am UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/12 "2015-10-11T00:04:05Z")

</div>

Not directly, you can do it with the ruby plugin and a bit of code though.

---

<div class="post-metadata">

### Author: ![mrguzzi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mrguzzi/32/15179_2.png) [@mrguzzi](https://discuss.elastic.co/u/mrguzzi)
#### Post date: [February 3, 2017, 10:04am UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/13 "2017-02-03T10:04:34Z")

</div>

Hello, at the moment with version 5 of kibana, is possible to change the number format, using the "," for the decimals?  
Thanks

---

<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 6, 2017, 1:33pm UTC](https://discuss.elastic.co/t/numeral-js-custom-format/29334/14 "2017-07-06T13:33:17Z")

</div>


