[SOLVED]How to get subtotal for few columns only and not for other columns
Hi,
Iam using the below piece of code and Iam doing a subtotal on the COL3 and Iam getting the subtotal for MON_RESULTS till COL_DOLLAR but I need the Subtotal only from MON_RESULTS till Total column.
Can anyone please let me know how to not show the subtotal for these 2 columns namely - COL_PERCENT and COL_DOLLAR.
TABLE FILE SQLOUT PRINT COL1 COL2 COL3 COL4 MON_RESULTS TUE_RESULTS WED_RESULTS THUR_RESULTS FRI_RESULTS SAT_RESULTS TOTAL COL_PERCENT COL_DOLLAR COL9_text BY COL3 NOPRINT ON TABLE PCHOLD FORMAT EXL2K ON COL3 SUBTOTAL END -RUN -EXIT
Thanks a lot in advance!
Regards!This message has been edited. Last edited by: info4pal,
APP PATH IBISAMP
TABLE FILE CAR
SUM
SALES
DEALER_COST
COMPUTE PCT_DEALER_COST/D20.2%=PCT.DEALER_COST;
RETAIL_COST
BY COUNTRY
ON COUNTRY SUBTOTAL DEALER_COST RETAIL_COST
ON TABLE SET PAGE-NUM NOLEAD
END
As Ram indicates, the default for SUBTOTAL is to subtotal all numeric fields (including percentages, which makes the result ridiculous). To subtotal only specific fields, just identify them after the SUBTOTAL command. Any fields not specifically mentioned will be ignored.