# Matrix aggregate question

**URL:** <https://discuss.elastic.co/t/matrix-aggregate-question/249421>\
**Category:** Elasticsearch\
**Created:** [September 21, 2020, 8:41pm UTC](https://discuss.elastic.co/t/matrix-aggregate-question/249421 "2020-09-21T20:41:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aldo\_Sarmiento](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aldo_sarmiento/32/2317_2.png) [@Aldo\_Sarmiento](https://discuss.elastic.co/u/Aldo_Sarmiento)\
**Post date:** [September 21, 2020, 8:41pm UTC](https://discuss.elastic.co/t/matrix-aggregate-question/249421/1 "2020-09-21T20:41:52Z")

</div>

Hello I'm having a hard time figuring out if the aggregate functions would be able to achieve what I'm trying to do. It's hard to explain in text format, but I created a simple image: [https://imgur.com/a/YPXmrBI](https://imgur.com/a/YPXmrBI)

Basically I'm trying to group all records by assigned\_user and count how many documents they have for each of the given statuses.

Is something like this possible with ES given the document structure?

---

<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:** [October 19, 2020, 8:41pm UTC](https://discuss.elastic.co/t/matrix-aggregate-question/249421/2 "2020-10-19T20:41:54Z")

</div>

Closed on October 19, 2020, 8:41pm UTC

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