# Calculated the sum of blank per doc

**URL:** <https://discuss.elastic.co/t/calculated-the-sum-of-blank-per-doc/293516>\
**Category:** Elasticsearch\
**Tags:** kql-kibana-query-language\
**Created:** [January 5, 2022, 10:07am UTC](https://discuss.elastic.co/t/calculated-the-sum-of-blank-per-doc/293516 "2022-01-05T10:07:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sugand](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Sugand](https://discuss.elastic.co/u/Sugand)\
**Post date:** [January 5, 2022, 10:07am UTC](https://discuss.elastic.co/t/calculated-the-sum-of-blank-per-doc/293516/1 "2022-01-05T10:07:31Z")

</div>

Hi,

Have a data structure doc like attached, I want to create a field which is the calculation of sum of blanks per doc or per ID

 ![31](https://us1.discourse-cdn.com/elastic/original/3X/a/3/a3c0abde61225cd27263845278dac6eb4e842e79.jpeg)

So a field "total blank" with above example should be like  
"total blank"  
3  
2  
1  
1  
3

per the example document attached.

How can I achieve the same, appreciate your input's.

Thanks,

---

<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:** [February 2, 2022, 10:07am UTC](https://discuss.elastic.co/t/calculated-the-sum-of-blank-per-doc/293516/2 "2022-02-02T10:07:59Z")

</div>

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