Kibana lens grouping data by string pattern

Hello,

we have some finance transactions saved in Elasticsearch and I would like to create a visualization on the data.

All of the records have field "messageType" with a string value and I would need to group the records inside the chart by the value from this field when the have the same prefix.

The values are like "HD00, HD11, MT103, MT203". And on the chart i would like the see that I have X records of HD type and Y records of MT type.

Is that possible?

Kibana version is 7.12.1

You can use a runtime field for that: Manage index pattern data fields | Kibana Guide [7.16] | Elastic

Use a painless script to extract the prefix from the message type into a separate field, then use this field in the visualization.

Let me know if you need help with extracting the prefix

Thank you very much for nudging me in the right direction.
I didn't have the option to create a runtime field, so i created a scripted field and it works perfectly

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