# Replicating Timelion math function with Visual Builder

**URL:** <https://discuss.elastic.co/t/replicating-timelion-math-function-with-visual-builder/200283>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [September 19, 2019, 5:50pm UTC](https://discuss.elastic.co/t/replicating-timelion-math-function-with-visual-builder/200283 "2019-09-19T17:50:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PaulY](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@PaulY](https://discuss.elastic.co/u/PaulY)\
**Post date:** [September 19, 2019, 5:50pm UTC](https://discuss.elastic.co/t/replicating-timelion-math-function-with-visual-builder/200283/1 "2019-09-19T17:50:47Z")

</div>

Hi I have a Timelion visualization that generate a chart based on a calculation:  
.es(index=myIndex, q='SLType:100').subtract(.es(index=myIndex, q='SLType:200')).bars(stack=YES)

I am trying to get the same result in Visual Builder but I can't figure out how to do that. I can generate a chart with the two series (one bar for SLType:100, and one for SLType:200). But I don't see a way to perform the calculation the way I can do it in Timelion.

Thanks  
Paul

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [September 20, 2019, 5:22pm UTC](https://discuss.elastic.co/t/replicating-timelion-math-function-with-visual-builder/200283/2 "2019-09-20T17:22:29Z")

</div>

Hi Paul,

I do not think this is currently possible in TSVB. There is an existing issue that I believe addresses this limitation. [https://github.com/elastic/kibana/issues/22866](https://github.com/elastic/kibana/issues/22866)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 18, 2019, 5:23pm UTC](https://discuss.elastic.co/t/replicating-timelion-math-function-with-visual-builder/200283/3 "2019-10-18T17:23:07Z")

</div>

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