# Kibana Visualization

**URL:** <https://discuss.elastic.co/t/kibana-visualization/251437>\
**Category:** Kibana\
**Created:** [October 8, 2020, 12:38pm UTC](https://discuss.elastic.co/t/kibana-visualization/251437 "2020-10-08T12:38:25Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dosant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dosant/32/64489_2.png) [@dosant](https://discuss.elastic.co/u/dosant)\
**Post date:** [October 12, 2020, 8:53am UTC](https://discuss.elastic.co/t/kibana-visualization/251437/5 "2020-10-12T08:53:42Z")

</div>

@Sh3ldoris, Sorry for the initial confusing with the timelion.

Unfortunately Kibana doesn't fully support bucket\_script aggregations yet. Here is the issue to track: [https://github.com/elastic/kibana/issues/4707](https://github.com/elastic/kibana/issues/4707). But _something_ is possible with TSVB.

I found this example and _I think_ it should be possible in similar fashion to achieve your goal.

1. Create a scripted field or reinvest you documents and add additional fields like: `dotStart: boolean; dotTimeout: boolean`.
2. Use sum aggregation and them bucket script to subtract 2 sums. (Similar as described in [Weighted Average in a DataTable of Kibana](https://discuss.elastic.co/t/weighted-average-in-a-datatable-of-kibana/185909/2))

Maybe there is a simpler way, but, _I think_ suggested way should also work.

---

_[View the full topic](https://discuss.elastic.co/t/kibana-visualization/251437)._
