How to divide the numbers of a specific field by 100 in Kibana

Hello!

I have a field we amounts that have need to divide by 100. For example my field is Amount1 and all the numbers come like this, example:

3,456,890
23,44,950
80,531,865

I want to divide theme by 100 so the amount be like this:

34,568.90
23,449.50
805,318.65

I was trying to do something in the index pattern so I can fix it maybe with the Numeral.js to
move the decimal two spaces to the right, but its not working

But is not working!

There are two ways to do this:

  1. Use scripted fields located under Management > Index Patterns, click on the Scripted Fields tab and create a new scripted field. Beware... mileage may vary on performance.

  2. Use a bucket script pipeline aggregation in either Time Series Visual Builder or the normal aggregation framework. This will allow you to do an average of the amount1 and then write a painless script to divide the results by 100.

1 Like

Thanks very much simianhacker! It works.

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