# Percentages per day (per bucket) possible?

**URL:** https://discuss.elastic.co/t/percentages-per-day-per-bucket-possible/208138
**Category:** Kibana
**Created:** [November 15, 2019, 9:27pm UTC](https://discuss.elastic.co/t/percentages-per-day-per-bucket-possible/208138 "2019-11-15T21:27:52Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [November 18, 2019, 9:08pm UTC](https://discuss.elastic.co/t/percentages-per-day-per-bucket-possible/208138/2 "2019-11-18T21:08:14Z")

</div>

You can try with TSVB and the Math aggregation. Then you should be able to calculate the percentage of spam as "100 \* sum(spam)/sum(total\_volume)".  
Basically create 2 sum metrics, one for spam, one for total\_volume.  
Then create a math aggregation with the equivalent of the formula that I added above, and then keep just this line visible on the chart.  
PS: don't forget to keep the bucket size to 1d.

---

_[View the full topic](https://discuss.elastic.co/t/percentages-per-day-per-bucket-possible/208138)._
