Cant test as I don't have your data, but either syntax works for me:
proc report data=SASHELP.CLASS;
columns AGE WEIGHT HEIGHT AVG AVG1;
define AGE / group;
define WEIGHT/ analysis sum;
define AVG / computed;
compute AVG1;
AVG=WEIGHT.sum/_C3_;
AVG1=WEIGHT.sum/HEIGHT.sum;
endcomp;
run;
Age
Weight
Height
AVG
AVG1
11
135.5
108.8
1.2454044
1.2454044
12
472
297.2
1.5881561
1.5881561
13
266
184.3
1.443299
1.443299
14
407.5
259.6
1.5697227
1.5697227
15
469.5
262.5
1.7885714
1.7885714
16
150
72
2.0833333
2.0833333
... View more