# How do I put another related field below the columns?

**URL:** <https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564>\
**Category:** Kibana\
**Created:** [April 4, 2022, 11:07pm UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564 "2022-04-04T23:07:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandra\_Mata1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alejandra_mata1/32/103936_2.png) [@Alejandra\_Mata1](https://discuss.elastic.co/u/Alejandra_Mata1)\
**Post date:** [April 4, 2022, 11:07pm UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564/1 "2022-04-04T23:07:03Z")

</div>

I have an array of fields that I have already put in the form of columns, but my concern is that the count() appears as a metric at the bottom, but I need the date to appear, instead of count()

 ![11](https://us1.discourse-cdn.com/elastic/original/3X/e/7/e75dda88b4361b48f7d76bad206b06282193c32a.jpeg)

but what I need, to output the date related to that column, in this way,  
Do I have to do it with some metric?

 ![22](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d9aa8d6c5386421582587fc49fac7ff6fab94c4e.jpeg)

---

<div class="post-metadata">

**Author:** ![Iker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iker/32/91708_2.png) [@Iker](https://discuss.elastic.co/u/Iker)\
**Post date:** [April 5, 2022, 1:25am UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564/2 "2022-04-05T01:25:26Z")

</div>

Could you provide some example documents?; so we could suggest to you what metric, transformation, or scripted field could help you get the desired results.

---

<div class="post-metadata">

**Author:** ![Alejandra\_Mata1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alejandra_mata1/32/103936_2.png) [@Alejandra\_Mata1](https://discuss.elastic.co/u/Alejandra_Mata1)\
**Post date:** [April 5, 2022, 1:43am UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564/3 "2022-04-05T01:43:48Z")

</div>

![33](https://us1.discourse-cdn.com/elastic/original/3X/f/0/f0aaa51fb794faefdda4e858a9d175f555489758.jpeg)

have two columns, and Within these columns I would like it to be horizontal, that is, the stop above and the time below so:

EL RECREO | MARIN .. paradas  
06:05:00 | hora...

---

<div class="post-metadata">

**Author:** ![Iker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iker/32/91708_2.png) [@Iker](https://discuss.elastic.co/u/Iker)\
**Post date:** [April 5, 2022, 4:55am UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564/4 "2022-04-05T04:55:05Z")

</div>

I don' think this is possible in Kibana (But I could be wrong), mainly because you are looking for a row to columns operation; that is something I haven't seen in Elastic DSL or any of the aggregations. However, it could be possible with some post-processing in your specific language or a SQL query (In Canvas, for example).

---

<div class="post-metadata">

**Author:** ![Alejandra\_Mata1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alejandra_mata1/32/103936_2.png) [@Alejandra\_Mata1](https://discuss.elastic.co/u/Alejandra_Mata1)\
**Post date:** [April 5, 2022, 7:53pm UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564/5 "2022-04-05T19:53:53Z")

</div>

Look, with kibana lens I was able to remove the stop column horizontally, but now the problem is that the counter appears below and I want the time to appear

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/7/87d379ed41e7c166939081010c0242d4b5122be9.png)

---

<div class="post-metadata">

**Author:** ![Iker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iker/32/91708_2.png) [@Iker](https://discuss.elastic.co/u/Iker)\
**Post date:** [April 6, 2022, 4:26am UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564/6 "2022-04-06T04:26:48Z")

</div>

Using your example data and a dynamic field in the data view; it's possible to get something like what you are expecting; however, given that I'm using a metric (last value), it seems to me that this is not really a solution, but a workaround with a lot of downsides:

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

This visualization requires a dynamic field (timestamp\_key) formatted from the original timestamp/date field that you are using:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/5/5590403e11d940176e333b17e6615a590574ea6a.png)

In my mind, at least, the transposition that you are trying to perform should be something more like this (Sorry if I'm breaking any rules for posting other tool screenshots):

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

I hope it helps.

---

<div class="post-metadata">

**Author:** ![Alejandra\_Mata1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alejandra_mata1/32/103936_2.png) [@Alejandra\_Mata1](https://discuss.elastic.co/u/Alejandra_Mata1)\
**Post date:** [April 6, 2022, 5:30pm UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564/7 "2022-04-06T17:30:45Z")

</div>

Thank you very much, you have been of great help and one last question: in which tool are you making the last graph?

---

<div class="post-metadata">

**Author:** ![Iker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iker/32/91708_2.png) [@Iker](https://discuss.elastic.co/u/Iker)\
**Post date:** [April 6, 2022, 7:30pm UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564/8 "2022-04-06T19:30:07Z")

</div>

Grafana, the query depicted in the screenshot and a "Rows to Fields" transformation, but you should try SQL in a Canvas; I'm sure that is an excellent option, and it's possible to get your visualization using SQL.

---

<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:** [May 4, 2022, 7:30pm UTC](https://discuss.elastic.co/t/how-do-i-put-another-related-field-below-the-columns/301564/9 "2022-05-04T19:30:38Z")

</div>

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