# Combine data from multiple rows based on aggregation

**URL:** <https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608>\
**Category:** Kibana\
**Created:** [February 17, 2021, 7:55pm UTC](https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608 "2021-02-17T19:55:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hayo](https://avatars.discourse-cdn.com/v4/letter/h/4af34b/32.png) [@hayo](https://discuss.elastic.co/u/hayo)\
**Post date:** [February 17, 2021, 7:55pm UTC](https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608/1 "2021-02-17T19:55:15Z")

</div>

I have searched but was not able to find the answer or i just didnt see it!

I have data like:  
BookTitle | Author | Category  
A | Writer1 | Thriller  
A | Writer1 | Action  
B | Writer1 | Science fiction  
B | Writer1 | Fantasy  
A | Writer1 | Horror  
A | Writer1 | Thriller

Which i hope to represent in a dashboard as such in a data table  
BookTitle | Author | Category  
A | Writer1 | Thriller, Action, Horror  
B | Writer1 | Science fiction, Fantasy

Now i have tried the top hit metric, which works, until we have double categories recorded.

Is there a way to do this currently in kibana?

---

<div class="post-metadata">

**Author:** ![wayneseymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wayneseymour/32/42945_2.png) [@wayneseymour](https://discuss.elastic.co/u/wayneseymour)\
**Post date:** [February 18, 2021, 4:24pm UTC](https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608/2 "2021-02-18T16:24:24Z")

</div>

Looking into this now.

---

<div class="post-metadata">

**Author:** ![wayneseymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wayneseymour/32/42945_2.png) [@wayneseymour](https://discuss.elastic.co/u/wayneseymour)\
**Post date:** [February 18, 2021, 7:46pm UTC](https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608/3 "2021-02-18T19:46:15Z")

</div>

What version of Kibana did you try this on? Also, the Elastic Stack components. Thanks @hayo

---

<div class="post-metadata">

**Author:** ![hayo](https://avatars.discourse-cdn.com/v4/letter/h/4af34b/32.png) [@hayo](https://discuss.elastic.co/u/hayo)\
**Post date:** [February 18, 2021, 8:04pm UTC](https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608/4 "2021-02-18T20:04:33Z")

</div>

Thanks for checking @wayneseymour.  
We use 7.10.2. Elastic/logstash/kibana are the components

---

<div class="post-metadata">

**Author:** ![wayneseymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wayneseymour/32/42945_2.png) [@wayneseymour](https://discuss.elastic.co/u/wayneseymour)\
**Post date:** [February 18, 2021, 8:43pm UTC](https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608/5 "2021-02-18T20:43:24Z")

</div>

Awesome, thanks @hayo . Oh, just to double check, all three are on 7.10.2 correct?

---

<div class="post-metadata">

**Author:** ![hayo](https://avatars.discourse-cdn.com/v4/letter/h/4af34b/32.png) [@hayo](https://discuss.elastic.co/u/hayo)\
**Post date:** [February 18, 2021, 9:53pm UTC](https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608/6 "2021-02-18T21:53:04Z")

</div>

Indeed

---

<div class="post-metadata">

**Author:** ![wayneseymour](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wayneseymour/32/42945_2.png) [@wayneseymour](https://discuss.elastic.co/u/wayneseymour)\
**Post date:** [February 19, 2021, 6:07pm UTC](https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608/7 "2021-02-19T18:07:02Z")

</div>

Ok, from what I understand there is probably a workaround for this, but maybe not exactly how you want the result. It's like a db.groupBy() call, but unsure if you can see it like you want. Still looking though

---

<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 19, 2021, 6:07pm UTC](https://discuss.elastic.co/t/combine-data-from-multiple-rows-based-on-aggregation/264608/8 "2021-03-19T18:07:26Z")

</div>

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