# Edit Index numeral.js

**URL:** <https://discuss.elastic.co/t/edit-index-numeral-js/175873>\
**Category:** Kibana\
**Created:** [April 8, 2019, 3:26pm UTC](https://discuss.elastic.co/t/edit-index-numeral-js/175873 "2019-04-08T15:26:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lebedev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lebedev/32/53579_2.png) [@Lebedev](https://discuss.elastic.co/u/Lebedev)\
**Post date:** [April 8, 2019, 3:26pm UTC](https://discuss.elastic.co/t/edit-index-numeral-js/175873/1 "2019-04-08T15:26:36Z")

</div>

Hello!  
dear collegues, i try to devide numeric data, but something goes wrong.  
I have the value for example 1000000 and i need output view 10.000 (in this operatin i devided start value on 100 and add splitter).

In my logstash config i did change type of value:

convert =\> {"amount\_transaction" =\> "integer"  
"Ammount\_billing" =\> "integer"}

But in UI Kibana i can not understand how i should work with numeral.js becouse .devide(100) dont work.

Could you explain or show me how i can solve it, maybe in UI Kibana or in logactash config (ruby code)?

Thank you a lot

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [April 8, 2019, 11:59pm UTC](https://discuss.elastic.co/t/edit-index-numeral-js/175873/2 "2019-04-08T23:59:33Z")

</div>

Can you give the `_source` data from a sample document in your data?

Do you have an Index Pattern defined in Kibana showing how the data is mapped, and can you see the field you expect and is it mapped how you expect?

It'll help to see the all that above info, and the entire expression you have in Timelion to understand why `.divide()` isn't working.

---

<div class="post-metadata">

**Author:** ![Lebedev](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lebedev/32/53579_2.png) [@Lebedev](https://discuss.elastic.co/u/Lebedev)\
**Post date:** [April 10, 2019, 8:39am UTC](https://discuss.elastic.co/t/edit-index-numeral-js/175873/3 "2019-04-10T08:39:16Z")

</div>

Hi, Tim!  
Thank you for reply  
Well i make some pcs to show situation:

As i see in Kibana i have numeral type for value

 ![Common_Ammount](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4adee8e77485a7da18b7bd6822a0bc4ccf22b5cb.jpeg)

Well next step, i did try to change my default value (1000000). I should divide on 100 (the first step).  
 ![Ammount_billing](https://us1.discourse-cdn.com/elastic/original/3X/1/7/17d3bf7e4281609395154e93bd8448ea91e400f4.jpeg)

As we can see my setting (.devide(100) ) not work.

Tim, you told about Timelion could you epxplain me how i can make troubleshooting or maybe i should to give more details about situation.

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [April 10, 2019, 4:48pm UTC](https://discuss.elastic.co/t/edit-index-numeral-js/175873/4 "2019-04-10T16:48:15Z")

</div>

> [@Lebedev](#):
>
> Tim, you told about Timelion could you epxplain me how i can make troubleshooting or maybe i should to give more details about situation.

I apologize, this was my misunderstanding. I thought you were building visualizations using Timelion expressions, because `.divide()` is a Timelion function. The chained function syntax isn't used anywhere else in Kibana.

You can add a field to the index pattern to represent a calculation on a field. That isn't through field formatting: it's through scripted fields.

Please read over the documentation on scripted fields: [Index patterns has been renamed to data views. | Kibana Guide [8.11] | Elastic](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html)

---

<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:** [May 8, 2019, 4:48pm UTC](https://discuss.elastic.co/t/edit-index-numeral-js/175873/5 "2019-05-08T16:48:16Z")

</div>

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