I have the following code that sums 1 field and then computes 2 additional fields. How can I either exclude the 2 computed fields on the subtotal rows or actually calculate the 2 computed fields on the subtotals? Right now my output looks like this:
TERM BAL AS OF DATE1 BAL AS OF DATE2 DIFFERENCE PERCENT CHANGE
A 10000.00 5000.00 -5000.00 -50%
B 20000.00 0.00 -20000.00 -100%
C 0.0 10000.00 10000.00 0%
D 0.0 15000.00 15000.00 0%
SUBTOTAL 30000.00 30000.00 0.00 -150%
TABLE FILE HOUTPUT
SUM
LINE_AMT
BY SUBSORT1 NOPRINT
BY GTYPE NOPRINT
BY TERMS NOPRINT
BY TERM NOPRINT
BY TERMNAME AS ' '
ACROSS BAL AS 'BALANCE'
COMPUTE
DIFFERENCE/D12.2 = C2 - C1;
PERCENT_CHANGE/D12.2% = (DIFFERENCE/C1) * (100); AS 'PERCENT CHANGE'
ON GTYPE SUBHEAD
"
ON GTYPE SUBTOTAL AS 'SUBTOTAL'
ON TERMS SUBTOTAL MULTILINES AS 'SUBTOTAL'
Thanks for your help.
Server Environment: Win2K3 Server WebFOCUS 7.13 Apache Tomcat standalone application server