create a shared variable, actually 2, one that is the running sum and the other how many items. Then increment the values accordingly.
When you want to display the average you would write a formula that calculates it....don't forget to reset the variables if you change groups or whenever the average should start over.
HTH