Focal Point
Row-Totals

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3761018331

December 03, 2004, 07:08 PM
<focusermgic>
Row-Totals
Trying to do a Row-Total, however I have a percentage in this 'Row-Total' and need it to compute the total percentage and NOT sum it. I also have subtotals. So the report has a subtotals and row-totals. In the subtotals and row-totals there is a percentage. I figured out how to get the percentage to compute rather than sum in the subtotal, BUT now I can't figure out how to get the row-totals to compute the percentage rather than sum them. This is what my code looks like....

TABLE FILE HOLD1
SUM TOTAL1 AS 'TOTAL' SKIP-LINE OVER
MI OVER
COMPUTE CUMPCT/P6.1=(MI/TOTAL1)*100; AS '%'
BY ORGN PAGE-BREAK NOPRINT
BY ISSUENAME NOPRINT
BY POOLNO
BY ISSUENAME RECOMPUTE MULTILINES
-*ON ORGN RECOMPUTE MULTILINES ROW-TOTAL AS 'GRAND TOTAL'
ON ORGN SUMMARIZE
ACROSS MONTH
ON TABLE SUMMARIZE
HEADING
"PAGE <TABPAGENO <93 Contract Underwriting"
"<77 Pacific Region Volume By Pool Name - Ref# 742"
"<99 &CURRMON <103 &CURRENTYEAR"
" "
"<ORGN"
" "
END

Please help!
December 05, 2004, 10:51 PM
Piipster
I created this example with the car file.

I would hold the total data for the row-total and then append the more detailed data you need for the across value, to the same file. Note that for both of these steps simply use a BY.

Then you have all the calculations done, and held. It's a simple across report from there.


FILEDEF HOLD1 DISK C:\IBI\APPS\IBIFORUM\HOLD1.FTM

-RUN

TABLE FILE CAR
SUM
COMPUTE BODY_TYPE/A12 = 'Total'; as 'BODYTYPE'
RETAIL_COST
DEALER_COST

COMPUTE
PCTOVER/D8.2 = ( RETAIL_COST - DEALER_COST ) / DEALER_COST * 100;
BY
SEATS
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS HOLD1
END
FILEDEF HOLD1 DISK C:\IBI\APPS\IBIFORUM\HOLD1.FTM (APPEND
TABLE FILE CAR
SUM
RETAIL_COST
DEALER_COST
COMPUTE PCTOVER/D8.2 = ( RETAIL_COST - DEALER_COST ) / DEALER_COST * 100;
BY
SEATS
BY
BODYTYPE
ON TABLE HOLD AS HOLD1

END
TABLE FILE HOLD1
SUM
RETAIL_COST OVER
DEALER_COST OVER
PCTOVER
BY
SEATS
ACROSS
BODYTYPE
ON SEATS SKIP-LINE
... etc for styling and output options.

END