# Treat missing data as zero

**URL:** <https://discuss.elastic.co/t/treat-missing-data-as-zero/207137>\
**Category:** Kibana\
**Created:** [November 8, 2019, 3:42pm UTC](https://discuss.elastic.co/t/treat-missing-data-as-zero/207137 "2019-11-08T15:42:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bf31415](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bf31415](https://discuss.elastic.co/u/bf31415)\
**Post date:** [November 8, 2019, 3:42pm UTC](https://discuss.elastic.co/t/treat-missing-data-as-zero/207137/1 "2019-11-08T15:42:58Z")

</div>

when defining a visualization, is there a way to treat missing data as zero? i have counter data flowing into elastic but only when the counter has a \>0 value does it get written to elastic. so i might have some counter with a series of positive values and then no values for a period of time. kibana graphs this to the last positive value and then stops. when there is no data for this counter I'd like kibana to graph it as having a 0 value. possible? and if so how do i define this via the kibana UI? I tried adding this {"min\_doc\_count": 0} to advanced json but doesn't seem to be working. what am i missing?

thanks

---

<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:** [November 11, 2019, 2:26pm UTC](https://discuss.elastic.co/t/treat-missing-data-as-zero/207137/2 "2019-11-11T14:26:14Z")

</div>

Hello,

The advanced json with {"min\_doc\_count": 0} should work for thus,

Can you please let me know which version of Kibana are you in?

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![bf31415](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@bf31415](https://discuss.elastic.co/u/bf31415)\
**Post date:** [November 11, 2019, 7:27pm UTC](https://discuss.elastic.co/t/treat-missing-data-as-zero/207137/3 "2019-11-11T19:27:08Z")

</div>

7.1.1. See below. Am i missing something?

 ![49](https://us1.discourse-cdn.com/elastic/original/3X/d/2/d25ba1e703caa9cdc37d3dcc01d6dd0321b5a06e.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:** [December 9, 2019, 7:27pm UTC](https://discuss.elastic.co/t/treat-missing-data-as-zero/207137/4 "2019-12-09T19:27:14Z")

</div>

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