# Bucket Script in Data table Visualization OR Option to download raw data as csv from TSVB table

**URL:** <https://discuss.elastic.co/t/bucket-script-in-data-table-visualization-or-option-to-download-raw-data-as-csv-from-tsvb-table/225124>\
**Category:** Kibana\
**Created:** [March 26, 2020, 6:37am UTC](https://discuss.elastic.co/t/bucket-script-in-data-table-visualization-or-option-to-download-raw-data-as-csv-from-tsvb-table/225124 "2020-03-26T06:37:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)\
**Post date:** [March 26, 2020, 6:37am UTC](https://discuss.elastic.co/t/bucket-script-in-data-table-visualization-or-option-to-download-raw-data-as-csv-from-tsvb-table/225124/1 "2020-03-26T06:37:26Z")

</div>

Hello Team,

I have a requirement to show percentage value in a data table and send it as a report to user for the mentioned interval. In normal Data table visualization we have Formatted , CSV to export raw data from the kibana, but same thing is not there in Visual builder

I have a challenge here to use Data Table ,

> I need to take sum of field1 and sum of field 2 then calculate the percentage of field1 and field2.

I am not able to achieve this in Data table visualization, but this can be done in TSVB using Bucket script , but there i don't have an option to export the data.

Can you please suggest me a better approach to my problem!!

Thanks  
Ramy

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [March 30, 2020, 9:18pm UTC](https://discuss.elastic.co/t/bucket-script-in-data-table-visualization-or-option-to-download-raw-data-as-csv-from-tsvb-table/225124/2 "2020-03-30T21:18:34Z")

</div>

Hello Ramya,

unfortunately we cannot download csv report out of time series visual builder. You can print a report and share it though?

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)\
**Post date:** [April 2, 2020, 10:52am UTC](https://discuss.elastic.co/t/bucket-script-in-data-table-visualization-or-option-to-download-raw-data-as-csv-from-tsvb-table/225124/3 "2020-04-02T10:52:54Z")

</div>

Hi Bhavya,

Printable Reports will not help user in terms of future enhancement on that data

Can i achieve following in Table Visualization

Agg1 - Sum of Incoming call  
Agg2 - Sum of All documents  
Agg3 - Sum of Incoming call \* 100 / Sum of All documents

I am able to do the above Calculation using bucket script in visual builder , how how can we do the same thing in data table visualization , Please help me!

Thanks  
Ramya

---

<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:** [April 30, 2020, 10:53am UTC](https://discuss.elastic.co/t/bucket-script-in-data-table-visualization-or-option-to-download-raw-data-as-csv-from-tsvb-table/225124/4 "2020-04-30T10:53:21Z")

</div>

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