Help for comparation dates with visual builder visualization

I have this data:

I use this filter:

{
"query": {
"bool": {
"filter": [
{
"script": {
"script": "doc['endTime'].date.isAfter(doc['due'].date)"
}
}
]
}
}
}

i would like build a visualization where i count how many tasks endTime is after dueDate (due).
I use visualbuilder where i have two aggregation (one count and other is filter radio). But if i define numerator endTime:>due the result is 0. Is not correct.

what i do wrong?

if i use other numerator work well. Example duration:>0

I would recommend creating a scripted field to create a computed field isPastDue. That way, you can just use the scripted field in any visualization.

Thanks a lot for your response. work in any visualization!

In future is possible use scripted field in TSVB (Visual Builder) ?

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