# Can we make values of variable as columns in datatable

**URL:** <https://discuss.elastic.co/t/can-we-make-values-of-variable-as-columns-in-datatable/95879>\
**Category:** Kibana\
**Created:** [August 4, 2017, 12:24pm UTC](https://discuss.elastic.co/t/can-we-make-values-of-variable-as-columns-in-datatable/95879 "2017-08-04T12:24:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manoj\_13](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Manoj\_13](https://discuss.elastic.co/u/Manoj_13)\
**Post date:** [August 4, 2017, 12:24pm UTC](https://discuss.elastic.co/t/can-we-make-values-of-variable-as-columns-in-datatable/95879/1 "2017-08-04T12:24:50Z")

</div>

Suppose i have a variable called **status** of my Incident. Its value can be **open ,closed,resolved,reopened**.(pic below)

 ![Screenshot (54)](https://us1.discourse-cdn.com/elastic/original/3X/1/8/182475e434bbc0c46fb7859535fd549561b6c0c8.png)

Now can i refactor the datatable such that list of available terms in **status** like **Open , Resolved etc.** are shown as columns and get their respective count as values under those columns?

---

<div class="post-metadata">

**Author:** ![CDR](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@CDR](https://discuss.elastic.co/u/CDR)\
**Post date:** [August 4, 2017, 12:33pm UTC](https://discuss.elastic.co/t/can-we-make-values-of-variable-as-columns-in-datatable/95879/2 "2017-08-04T12:33:57Z")

</div>

I'm not sure if you can make it so that each term has its own column. But you can make a chart visualization so that each term has a row. The left most part can be the term and the right part could be the count.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e068a625835a8e180d888c4550aff81dbff7aba9.png)

You can then add more filters. As you add more filters it will add more rows.

---

<div class="post-metadata">

**Author:** ![Manoj\_13](https://avatars.discourse-cdn.com/v4/letter/m/45deac/32.png) [@Manoj\_13](https://discuss.elastic.co/u/Manoj_13)\
**Post date:** [August 4, 2017, 12:57pm UTC](https://discuss.elastic.co/t/can-we-make-values-of-variable-as-columns-in-datatable/95879/3 "2017-08-04T12:57:40Z")

</div>

well thanks for the reply ,but that doesn't work because eventually the scenario might end up the same .

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [August 7, 2017, 3:06pm UTC](https://discuss.elastic.co/t/can-we-make-values-of-variable-as-columns-in-datatable/95879/4 "2017-08-07T15:06:35Z")

</div>

Hi @Manoj_13,

the data table can not yet be configured like that, unfortunately. There are requests for a [pivot table visualization](https://github.com/elastic/kibana/issues/5049) which should be able to achieve that. Please add your vote to the linked issue to give more weight to the request.

There is a way to get a similar result with the heat map visualization though. If you put `boardName.keyword` and `status.keyword` as `Terms` aggregations on the x- and y-axis respectively and turn on the "Show Labels" option, you would end up with a table-like visualization like the following:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b8f2f3cfd76a9a659d248ccd88ffd99b46dce4c3.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:** [September 4, 2017, 3:07pm UTC](https://discuss.elastic.co/t/can-we-make-values-of-variable-as-columns-in-datatable/95879/5 "2017-09-04T15:07:00Z")

</div>

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