Q:
Do you have the function "Group summary"?
A:
There is an example of a Group Summary in the Home_Buying sample (found under Info -> Samples). Look in formula 1 of the Personal Budget view.