# Rollups for entity-centric data

**URL:** <https://discuss.elastic.co/t/rollups-for-entity-centric-data/191935>\
**Category:** Elasticsearch\
**Created:** [July 24, 2019, 2:11am UTC](https://discuss.elastic.co/t/rollups-for-entity-centric-data/191935 "2019-07-24T02:11:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanziee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seanziee/32/45151_2.png) [@seanziee](https://discuss.elastic.co/u/seanziee)\
**Post date:** [July 24, 2019, 2:11am UTC](https://discuss.elastic.co/t/rollups-for-entity-centric-data/191935/1 "2019-07-24T02:11:52Z")

</div>

Hey guys,

I've been testing the rollups API and still am not sure if it can do what I'd like. I'm interested in creating an entity-centric data model as discussed by @Mark_Harwood from my event data. I have 1000's of events, which have a customer id with an `amount` field. I'd like to rollup all the events from each customer id to have an average and sum for their `amount` fields.

So if customer99 has `amount = 1` in one event and `amount = 2` in another, I want to rollup the data so that instead of 2 events, this is rolled into one "event" with the `amount.sum=3` and `amount.average=1.5`. And I want that to happen for all `customerid` .

Is that possible with the rollup api?

If not, what is the best way to do this?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [July 24, 2019, 7:36am UTC](https://discuss.elastic.co/t/rollups-for-entity-centric-data/191935/2 "2019-07-24T07:36:46Z")

</div>

Take a look at the new [dataframes](https://www.elastic.co/guide/en/elasticsearch/reference/master/preview-data-frame-transform.html)

---

<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:** [August 21, 2019, 7:36am UTC](https://discuss.elastic.co/t/rollups-for-entity-centric-data/191935/3 "2019-08-21T07:36:51Z")

</div>

Closed on August 21, 2019, 7:36am UTC

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