# Kibana Visualize - Display count even if field not exists

**URL:** <https://discuss.elastic.co/t/kibana-visualize-display-count-even-if-field-not-exists/325246>\
**Category:** Kibana\
**Created:** [February 10, 2023, 11:13am UTC](https://discuss.elastic.co/t/kibana-visualize-display-count-even-if-field-not-exists/325246 "2023-02-10T11:13:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedro\_Ventura](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pedro_ventura/32/116646_2.png) [@Pedro\_Ventura](https://discuss.elastic.co/u/Pedro_Ventura)\
**Post date:** [February 10, 2023, 11:13am UTC](https://discuss.elastic.co/t/kibana-visualize-display-count-even-if-field-not-exists/325246/1 "2023-02-10T11:13:00Z")

</div>

Hello! First time posting here, I've been looking around but haven't found anything to point me towards the right direction to solve my issue.

I'm creating a data table which contains an aggregation by Terms for a date type field (order by metric:count).

However, for some of the files we have in our dataset this field does not exist.

Is there any way to display this field in the data table even if it doesn't exist for a given file?

That is, is it possible to display this column in the data table and for files that do not contain this field may appear as empty or NULL values?

Many thanks in advance for your help and kind regards,  
Pedro

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [February 13, 2023, 2:02pm UTC](https://discuss.elastic.co/t/kibana-visualize-display-count-even-if-field-not-exists/325246/2 "2023-02-13T14:02:40Z")

</div>

Hi @Pedro_Ventura

welcome to the Kibana community.  
Do you know in advance such field names? Perhaps `Filters` can be a solution in place of Top Values?

---

<div class="post-metadata">

**Author:** ![Pedro\_Ventura](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pedro_ventura/32/116646_2.png) [@Pedro\_Ventura](https://discuss.elastic.co/u/Pedro_Ventura)\
**Post date:** [February 14, 2023, 9:36am UTC](https://discuss.elastic.co/t/kibana-visualize-display-count-even-if-field-not-exists/325246/3 "2023-02-14T09:36:52Z")

</div>

Hi @Marco_Liberati !

Many thanks for your response on this.

Yes, I know in advance the name of such fields. Should I be using Filters instead of Terms?

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/2/32433cafa700f2b7e04ec4649e8b9cc80a432942.png)

---

<div class="post-metadata">

**Author:** ![Pedro\_Ventura](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pedro_ventura/32/116646_2.png) [@Pedro\_Ventura](https://discuss.elastic.co/u/Pedro_Ventura)\
**Post date:** [February 14, 2023, 9:41am UTC](https://discuss.elastic.co/t/kibana-visualize-display-count-even-if-field-not-exists/325246/4 "2023-02-14T09:41:02Z")

</div>

From what I understand, the filter is like a query (with the same language) so I put filter 1 = the field does not exist, filter 2 = the field exists and it gives me this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/7/275e191f53bccbdff05f65d3e93e8c67f4dab59b.png)

It clearly identifies the cases in which the field is empty, but when it is not empty it appears like this instead of the date:

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

How can I make the date appear in cases where it exists and in cases where it doesn't, it just presents me with a "-" or empty value?

---

<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:** [March 14, 2023, 9:41am UTC](https://discuss.elastic.co/t/kibana-visualize-display-count-even-if-field-not-exists/325246/5 "2023-03-14T09:41:32Z")

</div>

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