# Aggregation issue in Event reports

**URL:** <https://community.dhis2.org/t/aggregation-issue-in-event-reports/44797>\
**Category:** Supply Chain and LMIS\
**Tags:** tracker, analytics\
**Created:** [28 October 2021 08:55 UTC](https://community.dhis2.org/t/aggregation-issue-in-event-reports/44797 "2021-10-28T08:55:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![herbert\_kiwalya](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/herbert_kiwalya/32/28340_2.png) [@herbert\_kiwalya](https://community.dhis2.org/u/herbert_kiwalya)\
**Post date:** [28 October 2021 08:55 UTC](https://community.dhis2.org/t/aggregation-issue-in-event-reports/44797/1 "2021-10-28T08:55:12Z")

</div>

I have a tracker program capturing numbers of supply and demand of oxygen cylinders. The data elements are of number type and sum for aggregation. The event reports however are displayed counting. For example; No. of cylinders ordered over 3 days could be 2,4,2. Ideally, you’d expect a sum of 8 to be returned but the event report will instead display 2 of 2 and 1 of 4.

---

<div class="post-metadata">

**Author:** ![Gassim](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/gassim/32/35347_2.png) [@Gassim](https://community.dhis2.org/u/Gassim)\
**Post date:** [28 October 2021 17:15 UTC](https://community.dhis2.org/t/aggregation-issue-in-event-reports/44797/2 "2021-10-28T17:15:03Z")

</div>

Hey @herbert_kiwalya,  
Would you share the program rule used as well as screenshot maybe? Also, what is the version of the DHIS2 instance you are using? Thank you! (:

---

<div class="post-metadata">

**Author:** ![George\_McGuire](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/george_mcguire/32/33824_2.png) [@George\_McGuire](https://community.dhis2.org/u/George_McGuire)\
**Post date:** [10 December 2021 20:05 UTC](https://community.dhis2.org/t/aggregation-issue-in-event-reports/44797/3 "2021-12-10T20:05:49Z")

</div>

Hi @herbert_kiwalya. We have tried this very calculation last year in a pilot project but could not make it work and it is my understanding that the data model does not support the correct aggregation.  
However we have a functional prototype using an “aggregate” Data Set and also working on a customized Tracker Program for real time stock management with instant re-calculation of stock on hand (even off-line).  
Could you please share your use case to see if it matches our planned development?

---

<div class="post-metadata">

**Author:** ![George\_McGuire](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/george_mcguire/32/33824_2.png) [@George\_McGuire](https://community.dhis2.org/u/George_McGuire)\
**Post date:** [6 January 2022 08:58 UTC](https://community.dhis2.org/t/aggregation-issue-in-event-reports/44797/4 "2022-01-06T08:58:42Z")

</div>

Happy New Year! I remembered that one possible solution may be to use Program rules for the calculation (rather than a Program Indicator).

 ![grafik](https://dhis2.b-cdn.net/uploads/default/original/3X/2/a/2a20f1510d010a06e7f022e47c4dff13a6b1c3fe.png)
