Focal Point
COMPUTEd field not totaling

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

September 01, 2004, 01:45 PM
Steve C
COMPUTEd field not totaling
A frustrating problem: I have a complex report in which I use DECODE to look up a value that needs to appear on the report and that needs to be summed at the subtotal levels. However, I can not get it to sum, instead it treats it like an ALPHA format, and shows the last value found. This is the offending line:

COMPUTE PDAY/D12CN = DECODE DIVISION_NAME(LKP ELSE 0); AS 'Actual, from,Prev. Day'

I tried multiplying it by a factor, which works in that the new value is shown, but it still will not total. (it did prove that it is not being treated as an alpha field though) Any suggestions?
September 01, 2004, 02:04 PM
Leah
Steve,

Are you trying to sum in the same table request as you are doing the compute. You didn't post your whole fex so I'm wondering. If you are then the compute only shows the last record processed in the sort (internal matrix issues). I get bit with this a lot in calculating gpa's for student data. You might try the decode in a define and see what happens.

Leah C.
September 01, 2004, 02:08 PM
Steve C
Thanks. I did move it to a DEFINE and now it works as it should.