How to format aggregation output in kibana visualization

I want to format output in Overall Average of Average to percentage


I red that I can use painless script in kibana vizulization creator.

I could now found the proper syntax.

How can I achive that?

How do you want to format it? If you just want to show the way the number is shown, you can probably achieve this by setting the formatter of the in your index pattern:

I checked and this field is already filtred as percentage.

But I cannot make It work as I wont in Kibana.


How to get ride of not percentage field?

That's not the right place to configure it - you have to go to Management > Index pattern > Select field > format (

I have check that before and It is already formatted as a percentage

After some research, I guess It does not work because of this

We're actually nowadays using the default index pattern in the selection by default instead of * . Nevertheless it would be nice if you could have an autocompletion on existing index patterns (you should still be able to type anything else you want).

In my default index filebeat* I do not have this formaterand field.

I don't want to change the default index how can I format this field using a painless script?

The format you specify in the index pattern only takes effect if you use that index pattern as the source for your visualization.

I don't want to change the default index how can I format this field using a painless script?

I see two options:

  • You can create a separate index pattern matching the same data indices (e.g. filebea*), change the format there and build your visualization using that separate index pattern.
  • You can create a scripted field that does nothing but returning the value. Then you can specify the percentage formatter for this scripted field.
1 Like

I changed the default index pattern to * and now it works


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