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?
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.
Thanks. I did move it to a DEFINE and now it works as it should.
|Powered by Social Strata|