# How to show column headers for Data Table when no data is present

**URL:** <https://discuss.elastic.co/t/how-to-show-column-headers-for-data-table-when-no-data-is-present/109263>\
**Category:** Kibana\
**Created:** [November 27, 2017, 5:46pm UTC](https://discuss.elastic.co/t/how-to-show-column-headers-for-data-table-when-no-data-is-present/109263 "2017-11-27T17:46:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Feedy](https://avatars.discourse-cdn.com/v4/letter/f/76d3ee/32.png) [@Feedy](https://discuss.elastic.co/u/Feedy)\
**Post date:** [November 27, 2017, 5:46pm UTC](https://discuss.elastic.co/t/how-to-show-column-headers-for-data-table-when-no-data-is-present/109263/1 "2017-11-27T17:46:07Z")

</div>

I am attempting to create a chart/data table that shows column headers that may or may not have data for a particular time range associated with the chart/data table. See the below screenshot for an example:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/c/8cc2cf14d3c0d2a4690d8dd1a6a33907e6277c7d.jpg)

As you can see for this particular time range, Emergency, Alert, Critical, Error, and Debug shows a value of zero. But another day some of these headers might have a value more than zero. How do I go about creating the same chart in Kibana? I'm using the Data Table for the visualization but not having luck on figuring this out.

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [November 28, 2017, 6:06am UTC](https://discuss.elastic.co/t/how-to-show-column-headers-for-data-table-when-no-data-is-present/109263/2 "2017-11-28T06:06:21Z")

</div>

You can just add the metrics which you want to include and how they are calculated.

With the following data:

```auto
PUT notices
{
  "mappings": {
    "doc": {
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "host": {
          "type": "keyword"
        },
        "warning": {
          "type": "integer"
        },
        "error": {
          "type": "integer"
        }
      }
    }
  }
}

POST notices/doc
{
  "@timestamp": "2017-11-27T01:01:01",
  "host": "foo",
  "warning": 1
}

POST notices/doc
{
  "@timestamp": "2017-11-27T01:02:01",
  "host": "foo",
  "warning": 2
}

POST notices/doc
{
  "@timestamp": "2017-11-27T03:02:01",
  "host": "foo",
  "warning": 1
}

POST notices/doc
{
  "@timestamp": "2017-11-27T05:02:01",
  "host": "bar",
  "warning": 1
}

```

I have created a Data Table visualzation tracking the sum of warnings and errors by host.

 ![08](https://us1.discourse-cdn.com/elastic/original/3X/c/6/c6f5cdc49c3ea14e4f6501f43f0ed79f42ea2dd3.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 26, 2017, 6:06am UTC](https://discuss.elastic.co/t/how-to-show-column-headers-for-data-table-when-no-data-is-present/109263/3 "2017-12-26T06:06:28Z")

</div>

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