I have an alphanumeric field which is A20. The field only has numbers. I want to subtotal on the alphanumeric field. When I try to convert the alphanumeric to decimal using ATODBL, the maximum limit is 15 which is not serving my purpose. I have set SET SUMMARYLINES = NEW and tried SUBTOTAL, RECOMPUTE and SUMMARIZE, but it always gives the latest value.
Can somebody suggest a way to do a subtotal on alphanumeric fields?
ThanksThis message has been edited. Last edited by: Kerry,
WebFOCUS 7.7.02Windows Output Formats: Excel, HTML, PDF
I tried what you told but it is not working. The following is my define. alpha_amt_sold/A20=FTOA(LL_AMT_SOLD, '(D20.2)', alpha_amt_sold); equivsold/A20=IF type EQ 'Forward' THEN '' ELSE alpha_amt_sold;
I am converting the LL_AMT_SOLD (originally D20.2) to alpha so that I can use the second define. Now I have to subtotal on the field "equivsold" which is an A20 now. When I use the EDIT function, it is giving me a zero.
Thanks
WebFOCUS 7.7.02Windows Output Formats: Excel, HTML, PDF
September 16, 2011, 04:43 PM
Tom Flynn
You still bring the LL_AMT_SOLD column in:
TABLE FILE XXX
SUM
COMPUTE X_AMT/D20.2 = IF type EQ 'Forward' THEN 0 ELSE LL_AMT_SOLD; NOPRINT
BY MAIN_SORT_COLUMN
PRINT
equivsold
BY MAIN_SORT_COLUMN
ON MAIN_SORT_COLUMN SUBFOOT
" <+0><ST.X_AMT "
ON TABLE SET STYLE *
TYPE=SUBFOOT, STYLE=BOLD, HEADALIGN=BODY,$
ENDSTYLE
END
-EXIT
TABLE FILE CAR
SUM
COMPUTE DD/P20 MISSING ON = IF SALES LT 30000 THEN MISSING ELSE SALES;
BY COUNTRY
BY CAR
ON TABLE SET NODATA Forward
ON TABLE SUBTOTAL
END
September 19, 2011, 12:38 PM
sumant
Thanks a lot Tom and FreSte for the responses. I will try to implement your response and will update the thread.
WebFOCUS 7.7.02Windows Output Formats: Excel, HTML, PDF
September 19, 2011, 04:27 PM
sumant
Thanks a lot Tom and Freste for your sloutions. They solved my issue.
WebFOCUS 7.7.02Windows Output Formats: Excel, HTML, PDF