Can i use derived value in histogram aggregation?

GET urza/order/_search
{
"size": 0,
"aggs": {
"by_user": {
"terms": {
"field": "userId.keyword"
},
"aggs": {
"total_cost": {
"sum": {
"field": "subtotalPrice"
}
}
}
}
}
}

Now i want to apply histogram aggregation on total cost, Is this possible ??

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