# Time Series Visual Builder (TSVB) Table: How do I apply options to a Bucket Script computed field?

**URL:** <https://discuss.elastic.co/t/time-series-visual-builder-tsvb-table-how-do-i-apply-options-to-a-bucket-script-computed-field/213381>\
**Category:** Kibana\
**Created:** [December 30, 2019, 9:21pm UTC](https://discuss.elastic.co/t/time-series-visual-builder-tsvb-table-how-do-i-apply-options-to-a-bucket-script-computed-field/213381 "2019-12-30T21:21:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anelson-edge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anelson-edge/32/52865_2.png) [@anelson-edge](https://discuss.elastic.co/u/anelson-edge)\
**Post date:** [December 30, 2019, 9:21pm UTC](https://discuss.elastic.co/t/time-series-visual-builder-tsvb-table-how-do-i-apply-options-to-a-bucket-script-computed-field/213381/1 "2019-12-30T21:21:52Z")

</div>

I have for one of my columns in the TSVB table  
a bucket script that look like "params.numerator/params.denominator \* 100".

I wish to select a color based on that computed value, but I only see the raw values in the drop down in the options tab for the bucket script column. Am I missing something?

---

<div class="post-metadata">

**Author:** ![jportner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jportner/32/75692_2.png) [@jportner](https://discuss.elastic.co/u/jportner)\
**Post date:** [December 30, 2019, 11:33pm UTC](https://discuss.elastic.co/t/time-series-visual-builder-tsvb-table-how-do-i-apply-options-to-a-bucket-script-computed-field/213381/2 "2019-12-30T23:33:51Z")

</div>

Hi @anelson-edge --

I am not too familiar with TSVB or Bucket Scripts, but I was able to recreate what I think you're looking for using a slightly reworked version of the "[Logs] Host, Visits and Bytes Table" that comes with the Kibana sample data.

Here's the visualization:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/1/81e7481db6ae7f1461ba053c9522c38fe5a207f6.png)

Here are the Columns and Metrics:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/6/f637dd683af2838667a017d30f861668abd6cc40.png)

And here are the Options for the Bucket Script:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/0/20a5d664af2fda1c0fbde165a8b443507a7d58a4.png)

Does that help?

---

<div class="post-metadata">

**Author:** ![anelson-edge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anelson-edge/32/52865_2.png) [@anelson-edge](https://discuss.elastic.co/u/anelson-edge)\
**Post date:** [January 2, 2020, 2:14pm UTC](https://discuss.elastic.co/t/time-series-visual-builder-tsvb-table-how-do-i-apply-options-to-a-bucket-script-computed-field/213381/3 "2020-01-02T14:14:42Z")

</div>

That does indeed help! Thank you very much.  
My viz is now a thing of beauty with your help @jportner. 😂

What I find lacking for data table is examples and documentation. In any case I now see that I ignore the filter and aggregate function. (I wish I could find examples of those as well ☹ ).

Perhaps the pending New Year holidays made me a bit dense as well. 🤔

---

<div class="post-metadata">

**Author:** ![jportner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jportner/32/75692_2.png) [@jportner](https://discuss.elastic.co/u/jportner)\
**Post date:** [January 2, 2020, 3:22pm UTC](https://discuss.elastic.co/t/time-series-visual-builder-tsvb-table-how-do-i-apply-options-to-a-bucket-script-computed-field/213381/4 "2020-01-02T15:22:13Z")

</div>

Glad that helped!

I agree, the docs for visualizations and TSVB in particular could use more examples. I'll pass that along to the team.

Best,  
-Joe

---

<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:** [January 30, 2020, 3:22pm UTC](https://discuss.elastic.co/t/time-series-visual-builder-tsvb-table-how-do-i-apply-options-to-a-bucket-script-computed-field/213381/5 "2020-01-30T15:22:14Z")

</div>

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