# Aggregate multiple records to single chart

**URL:** <https://discuss.elastic.co/t/aggregate-multiple-records-to-single-chart/86561>\
**Category:** Kibana\
**Created:** [May 21, 2017, 9:56am UTC](https://discuss.elastic.co/t/aggregate-multiple-records-to-single-chart/86561 "2017-05-21T09:56:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [May 30, 2017, 5:22pm UTC](https://discuss.elastic.co/t/aggregate-multiple-records-to-single-chart/86561/4 "2017-05-30T17:22:44Z")

</div>

Maybe this post will help you. In this example, the user has data that might be in 3 different fields but they want one field they can search on. So if you create a scripted field that gets either the `Project.name: base object` or `Project.name: dereved object` into one string field you can aggregate on that.

> [@Fields aggregation or field formatter?](https://discuss.elastic.co/t/fields-aggregation-or-field-formatter/87023/2):
>
> Hi Chris, I think a scripted field might help. Here's an experiment I did. I put this data using Kibana dev console. Each doc has a name but in a different field; PUT /discuss/test/1 { "date" : "2017-05-26T00:01:00", "name" : "Lee" } PUT /discuss/test/2 { "date" : "2017-05-26T00:02:00", "firstName" : "Bob" } PUT /discuss/test/3 { "date" : "2017-05-26T00:02:30", "fullName" : "Bart Simpson" } It looks like this in Discover; Obviously I can already sea…

---

_[View the full topic](https://discuss.elastic.co/t/aggregate-multiple-records-to-single-chart/86561)._
