Hi Everyone,
I have a problem using COMPUTE.
here is the table
TABLE FILE TEST1
HEADER CENTER
"THIS IS A TEST"
" "
SUM
FIELD1/D12.1 AS 'IRR'
FIELD2/D12.1 AS 'ACT'
ACROSS FREASON AS 'REASON'
COMPUTE TOTFIELD1 = C1 + C5;
COMPUTE TOTFIELD2 = C3 + C7;
BY SORT1
BY SORT2
BY SORT3 -* THIS MAY BE ' ' INSTEAD OF A FIELD NAME
END
the output looks like this
TEST
REASON
SORT1 SORT2 FIELD1 FIELD2 TOTFIELD1 TOTFIELD2
on occasion I will have SORT3 but not always.
WHY Is it that I need to jump two C# fields in order to compute TOTFIELD1 AND TOTFIELD2. I have a book and it is very straight forward, according to it I should be able to use C1+C3 and C2+C4, respectively. However I can not.
this situation is not bad for now. the problem arises when I give this to the user and they request a 3rd sort. by C# values will change and the result will be wrong.
I hope my problem is understandable, thanks in advanced for your help.
cc
PS i am summarizing my table. if SORT3 is not used the statement "BY SORT3" is not included. ex: &Sort3 = 'BY SORT3'
I have a problem using COMPUTE.
here is the table
TABLE FILE TEST1
HEADER CENTER
"THIS IS A TEST"
" "
SUM
FIELD1/D12.1 AS 'IRR'
FIELD2/D12.1 AS 'ACT'
ACROSS FREASON AS 'REASON'
COMPUTE TOTFIELD1 = C1 + C5;
COMPUTE TOTFIELD2 = C3 + C7;
BY SORT1
BY SORT2
BY SORT3 -* THIS MAY BE ' ' INSTEAD OF A FIELD NAME
END
the output looks like this
TEST
REASON
SORT1 SORT2 FIELD1 FIELD2 TOTFIELD1 TOTFIELD2
on occasion I will have SORT3 but not always.
WHY Is it that I need to jump two C# fields in order to compute TOTFIELD1 AND TOTFIELD2. I have a book and it is very straight forward, according to it I should be able to use C1+C3 and C2+C4, respectively. However I can not.
this situation is not bad for now. the problem arises when I give this to the user and they request a 3rd sort. by C# values will change and the result will be wrong.
I hope my problem is understandable, thanks in advanced for your help.
cc
PS i am summarizing my table. if SORT3 is not used the statement "BY SORT3" is not included. ex: &Sort3 = 'BY SORT3'