# Table visualization with header defined as row as well as cols

**URL:** <https://discuss.elastic.co/t/table-visualization-with-header-defined-as-row-as-well-as-cols/94775>\
**Category:** Kibana\
**Created:** [July 27, 2017, 11:10am UTC](https://discuss.elastic.co/t/table-visualization-with-header-defined-as-row-as-well-as-cols/94775 "2017-07-27T11:10:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Prashant\_Agrawal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_agrawal/32/74982_2.png) [@Prashant\_Agrawal](https://discuss.elastic.co/u/Prashant_Agrawal)\
**Post date:** [July 27, 2017, 11:10am UTC](https://discuss.elastic.co/t/table-visualization-with-header-defined-as-row-as-well-as-cols/94775/1 "2017-07-27T11:10:20Z")

</div>

Is there a way in kibana to make a table as attached, where header as row has name and header as first column has date. Nothing but a table which can be made in excel.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/3/c/3c24d5e5fc17d00ac3d4b85ba3358928f69e53ff.png)

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [July 27, 2017, 7:51pm UTC](https://discuss.elastic.co/t/table-visualization-with-header-defined-as-row-as-well-as-cols/94775/2 "2017-07-27T19:51:24Z")

</div>

Hi

You can achieve the above table with Date histogram with Timestamp as attached. Based on the buckets defined, you will be able to populate the data in a tabular format. Do let us know if you need further assistance. This could get you started...

 ![](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fd88d06d156ef8591b715efc05eaa53611b349c0.png) ![](https://us1.discourse-cdn.com/elastic/original/3X/2/0/2012af8f52a7eb4805c01b84aac651f171ca9d36.png)

---

<div class="post-metadata">

**Author:** ![Prashant\_Agrawal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_agrawal/32/74982_2.png) [@Prashant\_Agrawal](https://discuss.elastic.co/u/Prashant_Agrawal)\
**Post date:** [July 31, 2017, 11:26am UTC](https://discuss.elastic.co/t/table-visualization-with-header-defined-as-row-as-well-as-cols/94775/3 "2017-07-31T11:26:43Z")

</div>

Hello @rashmi  
Thanks for your kind response. Here my objective is to define 2 header one as top row which you can see in the attached image as **SalonName** fields where as second header is **date** which is defined as column.

So far what I know is as table works where column fields will be shown only vertically as sub aggregation. So my question is , is there a way we can make a table like above in Kibana where headers can be represented as row as well as column.

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [August 1, 2017, 9:27pm UTC](https://discuss.elastic.co/t/table-visualization-with-header-defined-as-row-as-well-as-cols/94775/4 "2017-08-01T21:27:57Z")

</div>

hello Prashant

Am thinking you could benefit from creating a scripted field like this example here:`if (doc['extension.raw'].value == "jpg") return doc['bytes'].value; else return 0;` to return the values of your choice in data table. Here is a comparison of data table viz not showing the scripted fields in comparison to using a scripted fields. See the date, label and count described in data-table.

Hope this helps. You can develop a scripted field like the one shown in the example for your data table.

Attached

 ![33 PM](https://us1.discourse-cdn.com/elastic/original/3X/7/3/73a9aa47045ac373d47d3fdd47b456112bb29e4b.png) ![14 PM](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e0afbaa312dd93b321f14d1e69426d90fc5d9bb2.png)

---

<div class="post-metadata">

**Author:** ![Prashant\_Agrawal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prashant_agrawal/32/74982_2.png) [@Prashant\_Agrawal](https://discuss.elastic.co/u/Prashant_Agrawal)\
**Post date:** [August 5, 2017, 9:35am UTC](https://discuss.elastic.co/t/table-visualization-with-header-defined-as-row-as-well-as-cols/94775/5 "2017-08-05T09:35:46Z")

</div>

Thanks Rashmi,

But unfortunately I am looking out to define the aggregation on row as well as first column , just like we can make in excel.

---

<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 2, 2017, 9:35am UTC](https://discuss.elastic.co/t/table-visualization-with-header-defined-as-row-as-well-as-cols/94775/6 "2017-09-02T09:35:47Z")

</div>

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