How do I translate and format values in report columns

Hi all,

I have created a data table visualization from a search. I want to translate the values in the columns from the raw values to some thing more meaningfull for the user.

Boolean values
Instead of showing true/false, I would like to show Yes/No in the cells.

Missing values
Instead of showing an empty cell where there is no value present, I would like to show "N/A" in the cell.

Date format
For the @timestamp data I want to show the data in mm/dd/yy format, can I provide a date format such as in Java

Translate values
One boolean column has 3 possible values such as 1, 0, -1. I would like show Yes, No, and Uknown instead of the number.

How do you accomplish this in XPack.

Thanks

Hi,

This might be an expensive operation process wise. But you can use define scripted fields to your fields to show what you want and then display them. You can define them here under index pattern under management:

Here is the documentation for it: https://www.elastic.co/guide/en/kibana/current/scripted-fields.html

Painless syntax: https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-getting-started.html

For your third requirement, to change the date format, you can use date formatter on the fields under index pattern in management again:

Hope this helps.

Cheers,
Bhavya

1 Like

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