To use aggregate values in calculated fields:
To include the values calculated by aggregate functions in a new calculated field, click in the first empty cell in the field row of the query grid. Click the Expression Builder button. Notice that by default, all of the totals in your query are listed in the middle box. Double-click a total to add it to the expression box. Continue building the expression. When the expression is complete, click OK. Replace the expression title with something meaningful. Finally, change the total type to expression. When you run the query, you'll see the new calculated field for each record group.