Hi,
There is no aggregate function in datagrid 2.
Check the below link for alternate way
https://forum.mendix.com/link/questions/113556
I hope Mendix adds ths kind of functionality like we had in the old datagrid.