# Creating Visualization with Aggregation

**URL:** <https://discuss.elastic.co/t/creating-visualization-with-aggregation/306069>\
**Category:** Kibana\
**Created:** [May 31, 2022, 10:05pm UTC](https://discuss.elastic.co/t/creating-visualization-with-aggregation/306069 "2022-05-31T22:05:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![coolUser445](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cooluser445/32/101849_2.png) [@coolUser445](https://discuss.elastic.co/u/coolUser445)\
**Post date:** [May 31, 2022, 10:05pm UTC](https://discuss.elastic.co/t/creating-visualization-with-aggregation/306069/1 "2022-05-31T22:05:49Z")

</div>

Hello,

I have data of the following form:

**Person : Products Ordered**  
Bob : ["Apples", "Oranges"]  
Alice : ["Mangos", "Milk", "Tomatoes"]  
Bob : ["Apples", "Bananas", "Pie"]  
Alice : ["Oranges", "Milk"]

and I want to create a visualization aggregating all the products ordered by a person. So in this example,

**Person Products Ordered**  
Bob : "Apples, Oranges, Bananas, Pie"  
Alice : "Oranges, Milk, Tomatoes, Mangos"

Notice that I don't want any product duplicated in the list. Also, note that the field is a list of strings (Multi fields). How do I create this visualization? I looked for a documentation but could not find it. A Rest API for doing this is also acceptable but a visualization is more preferable. Thank you.

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [June 6, 2022, 10:24am UTC](https://discuss.elastic.co/t/creating-visualization-with-aggregation/306069/2 "2022-06-06T10:24:00Z")

</div>

Most of the visualizations we use in Kibana work with numerical values, so it's impossible to not include any numeric value in the chart. Here are some examples with analogical usecases, for a table and a pie. Something more specific to your usecase probaby would require using vega.

 ![Screenshot 2022-06-06 at 12.20.16](https://us1.discourse-cdn.com/elastic/original/3X/6/d/6d7c3a7184e62784690a909341f0745223f26d52.jpeg)  
 ![Screenshot 2022-06-06 at 12.22.04](https://us1.discourse-cdn.com/elastic/original/3X/9/f/9f86d3558e8b23bdc177a2c61a9579c6446fc33b.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:** [July 4, 2022, 10:24am UTC](https://discuss.elastic.co/t/creating-visualization-with-aggregation/306069/3 "2022-07-04T10:24:06Z")

</div>

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