how can i calculate the number of filter : sum[product.stillDate-Max (product.cutoff)> 0]
example of given:
product: A1- consumer: C1
{
"IdProduct": "A1",
"IdConsumer", "C1",
"StillDate": "2017-10-23T10: 00: 00Z"
"Cutoff": "2017-10-21T00: 00: 00Z"
"LibProduct", "test"
}
product: A1- consumer: C2
{
"IdProduct": "A1",
"IdConsumer": "C2"
"StillDate": "2017-10-23T10: 00: 00Z"
"Cutoff": "2017-10-22T08: 00: 00Z"
"LibProduct": "test1"
}
product: A1- consumer: C3
{
"IdProduct": "A1",
"IdConsumer": "C3"
"StillDate": "2017-10-23T10: 00: 00Z"
"Cutoff": "2017-10-23T08: 00: 00Z"
"LibProduct": "test2"
}
a product A1 is associated with 3 consumers with 3 cutoffs.
the maximum cutoff for product A1 is: 2017-10-23T08: 00: 00Z. So the number is: sum ((2017-10-23T10: 00: 00Z -2017-10-23T08: 00: 00Z)> 0) => 1
The question how can I do this on kibana? Thank you for your help and I apologize for my level in English