Add script for Kibana aggregations

Hi guys,
i have a datatable like below

What im trying to do is create scripting for my third column, the rule will look like this.
-We have know the ORDER_WAITING_FOR_PLANNING is 102 so we call this total_order, then third column will have formula like this: total_order - doc_count (doc_count in column 2).

Im really new in Kibana, so any guidance would be big help, Thank for reading

Unfortunately I don't think this is currently possible. You can follow the progress of this feature request here: https://github.com/elastic/kibana/issues/2646

Hi lukas,
Thank for response, i have research about scripted field, do you think it can help me in this case ?