Focal Point
[CLOSED] Unable to calculate the Average on an across field.Help needed urgently.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6287044136

June 12, 2013, 01:41 PM
info4pals
[CLOSED] Unable to calculate the Average on an across field.Help needed urgently.
i,

I have a table file and I need to do an average on the across field XYZ as shown in the code below.

TABLE FILE HOLDDP
SUM
CNT.DP
BY ID
BY NAME NOPRINT
BY REG NOPRINT
BY SUBR NOPRINT
BY RMD_YR NOPRINT
BY RMD_DT NOPRINT
BY SLS NOPRINT
BY SLD_Q NOPRINT
ACROSS XYZ
ACROSS ABC
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS HOLD1
END
-RUN

When i run the code,I will get the report as shown below :
ID Avg
XYZ _________________________
AAAA 12 05 06
BBBB 05 20 15
CCCC 15 13 09

My average Calculation is something like this :
Average = ((12*5)+(05*4)+(06*3))/(12+5+6).
Finally I need to display the average value in the average column beside the XYZ field.

Could anyone tell me how to do this.Any help is greatly appreciated.

Thanks a lot!

This message has been edited. Last edited by: <Kathryn Henning>,


webfocus 769,windows 7,html
June 13, 2013, 06:35 PM
<Kathryn Henning>
Hi info4pals,

I see that this is being addressed in the duplicate topics, so I'll mark this topic as [CLOSED].

Cheers!

Kathryn