I'm looking for a way in kibana to split data and recover only one value.
This is my data :
I splitted by the ID of the document.
Then I have done a min and max metric
Then with the plugin https://github.com/datasweet-fr/kibana-datasweet-formula I managed to make a custom metric (the delay between Date 1 and Date 2).
Then I have done the max of this metric (so the max delay is 38 there).
However, since I have splitted my data by the ID, I have the max value many times, and I only need it once.
I want it to display in a metric in kibana like this :
As you can see, the formula is displaying 107 because it's taking the delay between the min of ALL the Date 1 values and the max of ALL the Date 2 values. But I want it to split by DocumentID and then display the max of the metric.
I tried to use max bucket metric and other things but I didn't manage to make it work.
Is there a way to achieve this ?