Hi,
Several possible ways to approach this come to mind.
Change the domain model to group “Realistic” objects per period. So you would get Realisatic → ProductPeriod → Product. {edit: removed part about aggregate function, that was a mistake).
You can now calculate sums using aggregate list activities in microflows. The result could be stored as attribute value, or you could use a calculated value to calc the values on the fly.
An example:
“sum” is a calculated attribute. The microflow used looks like this:
The you can use a datagrid to display the values:
Or you could use OQL, but i always find that a bit tricky: https://docs.mendix.com/refguide/oql-group-by-clause/
I hope this helps.