# Kibana table visualisation with columns from different docs

**URL:** <https://discuss.elastic.co/t/kibana-table-visualisation-with-columns-from-different-docs/169880>\
**Category:** Kibana\
**Created:** [February 25, 2019, 4:54pm UTC](https://discuss.elastic.co/t/kibana-table-visualisation-with-columns-from-different-docs/169880 "2019-02-25T16:54:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tszyro](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@tszyro](https://discuss.elastic.co/u/tszyro)\
**Post date:** [February 25, 2019, 4:54pm UTC](https://discuss.elastic.co/t/kibana-table-visualisation-with-columns-from-different-docs/169880/1 "2019-02-25T16:54:42Z")

</div>

I am trying to make a visualisation in Kibana where the row will represent an indexed monthly counting and the columns will show aggregations from different documents.

I index some statistics on the end of each month into a single index. Each document has a field telling what is this particular statistic about. In simple form it can be shown as four documents as follows:

```
"hits": [
  {
    "_index": "tomasz_a",
    "_type": "doc",
    "_id": "1",
    "_score": 1,
    "_source": {
      "analysis_tag": "decode",
      "timestamp": "2019-02-01T00:00:00.000Z",
      "count": 11
    }
  },
  {
    "_index": "tomasz_a",
    "_type": "doc",
    "_id": "vUU5JWkBWsERaXgE_I_A",
    "_score": 1,
    "_source": {
      "analysis_tag": "decode",
      "timestamp": "2019-02-01T00:00:00.000Z",
      "count": 12
    }
  },
  {
    "_index": "tomasz_a",
    "_type": "doc",
    "_id": "NkVjJWkBWsERaXgEfuWy",
    "_score": 1,
    "_source": {
      "analysis_tag": "reception",
      "timestamp": "2019-02-01T00:00:00.000Z",
      "count": 14
    }
  },
  {
    "_index": "tomasz_a",
    "_type": "doc",
    "_id": "_create",
    "_score": 1,
    "_source": {
      "analysis_tag": "decode",
      "timestamp": "2019-02-01T00:00:00.000Z",
      "count": 13
    }
  }
]

```

I would like to make a table in the form:

Timestamp | Reception | Decode  
2019-01-01 | 18 | 16  
2019-02-02 | 14 | 17

I am using Kibana -\> Visualize -\> Data Table choosing metric: Top Hits.  
I can figure out how to split columns to make this table represent only particular fields values.

I am also trying to make it with painless language in JSON field on buckets but no luck so far ☹

Can anyone advise how to do it?  
Is there any better approach to make such visualisation?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 26, 2019, 4:22am UTC](https://discuss.elastic.co/t/kibana-table-visualisation-with-columns-from-different-docs/169880/2 "2019-02-26T04:22:28Z")

</div>

There's no clean way to do this at the moment, you can do a date histogram and then split by terms, but it won't give this structure.

---

<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 26, 2019, 4:32am UTC](https://discuss.elastic.co/t/kibana-table-visualisation-with-columns-from-different-docs/169880/3 "2019-03-26T04:32:50Z")

</div>

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