You need to calculate the sum in a microflow (it's easy if you use an Aggregate List action to sum) and store it in an attribute. Then, you can display this attribute in the UI (which may require some CSS to get a consistent look and feel).
The reason aggregation won't work is that this option on a data grid works on the database. Since non-persistent entities are not in the database, you cannot sum them using this option. This leads to an alternative solution: just persist your data.
You could use a template grid to display the objects in a table like view ( i like to add the column headings above the template grid, and the grid then displays the "cell" values.
Underneath the template grid you can display the total values which you calculated via microflow.