# Strange output in Time Series Visual Builder

**URL:** https://discuss.elastic.co/t/strange-output-in-time-series-visual-builder/104233
**Category:** Kibana
**Created:** [October 17, 2017, 11:27am UTC](https://discuss.elastic.co/t/strange-output-in-time-series-visual-builder/104233 "2017-10-17T11:27:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![eebee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eebee/32/26799_2.png) [@eebee](https://discuss.elastic.co/u/eebee)
#### Post date: [October 17, 2017, 11:27am UTC](https://discuss.elastic.co/t/strange-output-in-time-series-visual-builder/104233/1 "2017-10-17T11:27:06Z")

</div>

I'm trying to use TSVB to show a list of the most common alerts in my system. If I do a search in Discovery, I get three documents with my settings.

[Discovery view with three docs](http://apendofiles.governor.rocks/kibana5.png)

If I use Top N and do a Count Aggregation with a term grouping, I get all documents from the index within the selected time frame.

[Top N settings](http://apendofiles.governor.rocks/kibana6.png)

But I need to do some filtering to show just the alerts and not all status messages etc in the index. Therefore, I used Panel Filter \_type:elastalert to filer out the unwanted, just like in the Discovery tab.  
But with the filtering, I only get a count of 1, even though it should be 3. Why?

[Panel Filter settings](http://apendofiles.governor.rocks/kibana7.png)

If I look at the documents, they are identical, except for ID's and timestamps.

---

<div class="post-metadata">

### Author: ![simianhacker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simianhacker/32/3383_2.png) [@simianhacker](https://discuss.elastic.co/u/simianhacker)
#### Post date: [October 23, 2017, 4:07pm UTC](https://discuss.elastic.co/t/strange-output-in-time-series-visual-builder/104233/2 "2017-10-23T16:07:11Z")

</div>

It's showing the last bucket and not the count for the entire time period. You would need to add an "overall sum" to see all three.

---

<div class="post-metadata">

### Author: ![eebee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eebee/32/26799_2.png) [@eebee](https://discuss.elastic.co/u/eebee)
#### Post date: [October 24, 2017, 7:30am UTC](https://discuss.elastic.co/t/strange-output-in-time-series-visual-builder/104233/3 "2017-10-24T07:30:13Z")

</div>

Thank you, that did it!

---

<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: [November 21, 2017, 7:30am UTC](https://discuss.elastic.co/t/strange-output-in-time-series-visual-builder/104233/4 "2017-11-21T07:30:27Z")

</div>

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