Sort Repeating Group by Average of Number Field

I have a list of user transactions which contains a user and 1 number field per transaction. I would like to have a repeating group with content type of user. The struggle I am dealing with is I am unable to sort this repeating group by the average of the number field.

I can select the sort by this field but when unable to sort this with average not even using a dynamic field. Any Suggestions?