Creating a new bucket based on the results of other buckets sounds like a use case for bucket script aggregations, which unfortunately are not yet supported everywhere in Kibana.
However, the good news is that you should be able to do something like this using TSVB, which supports bucket scripts. Here's an example of this from another thread: Weighted Average in a DataTable of Kibana