# Visual Builder Time Series - Filter Ratio group by Terms

**URL:** https://discuss.elastic.co/t/visual-builder-time-series-filter-ratio-group-by-terms/213081
**Category:** Kibana
**Created:** [December 26, 2019, 1:22pm UTC](https://discuss.elastic.co/t/visual-builder-time-series-filter-ratio-group-by-terms/213081 "2019-12-26T13:22:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![omerdemb](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@omerdemb](https://discuss.elastic.co/u/omerdemb)
#### Post date: [December 26, 2019, 1:22pm UTC](https://discuss.elastic.co/t/visual-builder-time-series-filter-ratio-group-by-terms/213081/1 "2019-12-26T13:22:19Z")

</div>

I want to be able to find the ratio of times each value in a certain field existed.  
currently to achieve this I have to build a separate series with manual filters on each value.  
what i would assume should be possible (as possible in timelion) is to group by the terms on the field, and then the ratio will be for each term divided by the OVERALL numebrs.  
Today this doesn't seem possible, because I have to add a specific query.  
Please help

---

<div class="post-metadata">

### Author: ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)
#### Post date: [December 27, 2019, 11:39am UTC](https://discuss.elastic.co/t/visual-builder-time-series-filter-ratio-group-by-terms/213081/2 "2019-12-27T11:39:34Z")

</div>

Under `data` tab, configure `group by` section to split your data by term.

 ![Screen Shot 2019-12-27 at 4.37.57 AM](https://us1.discourse-cdn.com/elastic/original/3X/8/4/849a7a9c9bf4f70ae643d8793dffdb1045e6d6b7.png)

 ![Screen Shot 2019-12-27 at 4.37.47 AM](https://us1.discourse-cdn.com/elastic/original/3X/e/2/e2ae526a1693a919a78566789d5378c1667782ff.png)

---

<div class="post-metadata">

### Author: ![omerdemb](https://avatars.discourse-cdn.com/v4/letter/o/d26b3c/32.png) [@omerdemb](https://discuss.elastic.co/u/omerdemb)
#### Post date: [December 29, 2019, 8:22am UTC](https://discuss.elastic.co/t/visual-builder-time-series-filter-ratio-group-by-terms/213081/3 "2019-12-29T08:22:44Z")

</div>

@Nathan_Reese - thanks for responding, but this isn't what i'm looking for.  
If we take your example, what I would like to know is what percent of the destinations each airline has flights to.  
So the metric is cardinality on destination, and the group by is on Terms-Carrier, but there is no logical way to give the Numerator to be "carrier:relevant carrier from terms aggregation" and denominator to be "All". This is possible in timelion and is something i would assume can be possible here.

---

<div class="post-metadata">

### Author: ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)
#### Post date: [December 30, 2019, 6:52pm UTC](https://discuss.elastic.co/t/visual-builder-time-series-filter-ratio-group-by-terms/213081/4 "2019-12-30T18:52:15Z")

</div>

You can set TSVB to display things as a percentage of the subtotal, which should do what you are looking for. It's the second example in this post: **## What is the ratio of each delay type over time?** [https://www.elastic.co/blog/how-to-display-data-as-a-percentage-in-kibana-visualizations](https://www.elastic.co/blog/how-to-display-data-as-a-percentage-in-kibana-visualizations)

---

<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 27, 2020, 7:00pm UTC](https://discuss.elastic.co/t/visual-builder-time-series-filter-ratio-group-by-terms/213081/5 "2020-01-27T19:00:09Z")

</div>

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