# Easy max of count not working in gauge (TimeSeries)

**URL:** https://discuss.elastic.co/t/easy-max-of-count-not-working-in-gauge-timeseries/91063
**Category:** Kibana
**Created:** [June 28, 2017, 8:17am UTC](https://discuss.elastic.co/t/easy-max-of-count-not-working-in-gauge-timeseries/91063 "2017-06-28T08:17:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![gregbk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregbk/32/80289_2.png) [@gregbk](https://discuss.elastic.co/u/gregbk)
#### Post date: [June 28, 2017, 8:17am UTC](https://discuss.elastic.co/t/easy-max-of-count-not-working-in-gauge-timeseries/91063/1 "2017-06-28T08:17:19Z")

</div>

Hello,

Probably something I didn't understand well with time series.  
Wanted to display in gauge the number of port down since 1w, so a count of documents filtered by `type:tcp AND up:false`.  
Seems like I can see the graph, but when I switch to gauge, it always displays 0.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/5/2/52dcd07dff7eae6b395d85175e83ec8c7a15d9f6.png)

 ![](https://us1.discourse-cdn.com/elastic/original/3X/b/0/b0d2092d05cc106587324f2ba97d10ec9750bd1d.png)

 ![](https://us1.discourse-cdn.com/elastic/original/3X/6/5/658bbcba1263d8a2a2e3e7313d4f591d6e2e30bb.png)

 ![](https://us1.discourse-cdn.com/elastic/original/3X/4/d/4d8b29aa4d2b6a98654b120bddd224f96a153cf4.png)

Should I be able to do:

- Count document `type:tcp AND up:false`
- And do a max on that to see it in gauge? When aggregating in max I can't see the previous document.count

Big thanks for any help!  
Greg

---

<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: [June 29, 2017, 4:59pm UTC](https://discuss.elastic.co/t/easy-max-of-count-not-working-in-gauge-timeseries/91063/2 "2017-06-29T16:59:36Z")

</div>

Have you tried adding an Overall Max (pipeline sibling agg) to the series and then choosing the count aggregation as the metric? ON the time series visualization that will draw a flat line for the max of the series and on the gauge I think it will display the number you're looking for.

---

<div class="post-metadata">

### Author: ![gregbk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregbk/32/80289_2.png) [@gregbk](https://discuss.elastic.co/u/gregbk)
#### Post date: [June 30, 2017, 12:34pm UTC](https://discuss.elastic.co/t/easy-max-of-count-not-working-in-gauge-timeseries/91063/3 "2017-06-30T12:34:20Z")

</div>

Thanks so much @simianhacker, I used `Count -> Overall Sum(sibling pipe Agg) of metric (count)` and I got the result I wanted!

 ![](https://us1.discourse-cdn.com/elastic/original/3X/9/0/90e517f51af6bd871390cafb239502fe3ac84bfb.png)

---

<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: [July 28, 2017, 12:35pm UTC](https://discuss.elastic.co/t/easy-max-of-count-not-working-in-gauge-timeseries/91063/4 "2017-07-28T12:35:21Z")

</div>

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