# Split columns in a table

**URL:** https://discuss.elastic.co/t/split-columns-in-a-table/49184
**Category:** Kibana
**Created:** [May 4, 2016, 2:00pm UTC](https://discuss.elastic.co/t/split-columns-in-a-table/49184 "2016-05-04T14:00:13Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![fred-d](https://avatars.discourse-cdn.com/v4/letter/f/cc9497/32.png) [@fred-d](https://discuss.elastic.co/u/fred-d)
#### Post date: [May 4, 2016, 2:00pm UTC](https://discuss.elastic.co/t/split-columns-in-a-table/49184/1 "2016-05-04T14:00:13Z")

</div>

Hello,  
I have some problems creating a table and I hope you can help me.

The relevant part in my documents is a string field and an integer field.  
I have a row (bucket) for each string.  
I want columns with count for different values of the integer field.

Unfortunately, there's no option to split columns, which is kind of what I want to do. Can filters somehow be added to columns?

---

<div class="post-metadata">

### Author: ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)
#### Post date: [May 4, 2016, 3:04pm UTC](https://discuss.elastic.co/t/split-columns-in-a-table/49184/2 "2016-05-04T15:04:38Z")

</div>

Not sure if this will work for your use case:

First, split rows using a terms aggregation on your string field. Then, split table (columns) using a terms aggregation on your integer field.

The metric will be count.

---

<div class="post-metadata">

### Author: ![fred-d](https://avatars.discourse-cdn.com/v4/letter/f/cc9497/32.png) [@fred-d](https://discuss.elastic.co/u/fred-d)
#### Post date: [May 4, 2016, 3:21pm UTC](https://discuss.elastic.co/t/split-columns-in-a-table/49184/3 "2016-05-04T15:21:14Z")

</div>

Thanks for your quick reply.

This gives me several tables next to each other which doesn't look as nice as one table with multiple columns.

---

<div class="post-metadata">

### Author: ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)
#### Post date: [May 4, 2016, 3:41pm UTC](https://discuss.elastic.co/t/split-columns-in-a-table/49184/4 "2016-05-04T15:41:04Z")

</div>

Right, I should've mentioned earlier: I proposed this as a workaround because AFAIK there's no way to do what you want exactly today. I believe the functionality you are requesting is this: [https://github.com/elastic/kibana/issues/5978](https://github.com/elastic/kibana/issues/5978) (which is a duplicate of [https://github.com/elastic/kibana/issues/5049](https://github.com/elastic/kibana/issues/5049)).

---

<div class="post-metadata">

### Author: ![fred-d](https://avatars.discourse-cdn.com/v4/letter/f/cc9497/32.png) [@fred-d](https://discuss.elastic.co/u/fred-d)
#### Post date: [May 4, 2016, 6:43pm UTC](https://discuss.elastic.co/t/split-columns-in-a-table/49184/5 "2016-05-04T18:43:50Z")

</div>

Alright. So maybe it will be possible in a later version.

Thank you for your help.

---

<div class="post-metadata">

### Author: ![tomer](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@tomer](https://discuss.elastic.co/u/tomer)
#### Post date: [June 13, 2017, 2:16pm UTC](https://discuss.elastic.co/t/split-columns-in-a-table/49184/6 "2017-06-13T14:16:27Z")

</div>

> [@shaunak](#):
>
> Then, split table (columns) using a terms aggregation on your integer field.

Hi,  
When I did what you offered I got an empty screen and not a split table (multiple tables).

If you can help me it would be great 👍

---

<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: [November 4, 2022, 4:19am UTC](https://discuss.elastic.co/t/split-columns-in-a-table/49184/7 "2022-11-04T04:19:59Z")

</div>


