Focal Point
[CLOSED]Help with subtotal percentages

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

June 14, 2011, 04:21 PM
Charles Richards
[CLOSED]Help with subtotal percentages
TABLE FILE DETAIL
SUM
TOT.DTCost NOPRINT
BY DEPARTMENTCODE NOPRINT
SUM
subtotcost NOPRINT
subtotSRP NOPRINT
subTotalProfit NOPRINT
BY DEPARTMENTCODE NOPRINT
BY IN_COMCLASS NOPRINT
SUM
IN_ITEMCODE/I7 AS 'ItemCode'
IN_COMCLASS AS 'CC'
IN_DESC AS 'Item Description'
AVE.IN_PACK AS 'Pack'
IN_SIZE AS 'Size'
IN_QTY AS 'Cases Del.'
IN_SELL_UNITS AS 'Time Del.'
UnitMove AS 'Unit Move'
totCost AS 'Total Amount Paid'
totSRP AS 'Total Sell Value'
AVE.PercProf AS '% Profit'
TotalProfit
COMPUTE PCTTOT/D9.2 = ( totCost / subtotcost ) * 100;
AS '% Sales @ Cost'
COMPUTE PCTSRP/D9.2 = ( totSRP / subtotSRP ) * 100; AS '% Sales @ Sell'
COMPUTE PCTPRO/D9.2 = ( TotalProfit / subTotalProfit ) * 100;
AS 'Dol Profit'
DTCost
AVE.TotalProfit NOPRINT
BY DEPARTMENTCODE NOPRINT
BY IN_COMCLASS NOPRINT
BY IN_ITEMCODE NOPRINT

ON IN_COMCLASS RECOMPUTE
TotalProfit
IN_QTY
totCost
totSRP AS '*TOTAL'
------------------------------------------------


Would like to use the subtotaled form IN_COMCLASS and do this fomula (((totSRP-totcost)/totSRP)*100) and put the results under the PercProf column

and Lastly I would like to us a value from the susbtotaled DEPARTMENTCODE section to get

totCost(IN_COMCLASS subtotaled)/totCost(DEPARTMENTCODE subtotaled)

Ive tried several diffent ways and can't seem to figure it out
------------------------------------------------
ON DEPARTMENTCODE SUBTOTAL
TotalProfit
IN_QTY
totCost
totSRP

------------------------------------------------
Thanks for the help

Im learning, slowly but surely... thanks for everyones understanding


This will also help me calculate several other values in the report! thanks again

This message has been edited. Last edited by: Charles Richards,


WebFOCUS 7.6
Windows, All Outputs
June 15, 2011, 08:17 AM
GamP
Take a look at the RECAP command, I think it's what you need here.
Drawback of that is that you have to create your own subtotal line using ON field SUBFOOT.
The presentation of RECAP fields can only be controlled by putting them in a subfoot ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
June 15, 2011, 08:45 AM
Charles Richards
Thanks for the help!


How do i use a value from subtotaled IN_COMCLASS and a value from subtotaled DEPARTMENTCODE... Im trying to use (totCost from subtotaled IN_COMCLASS) Divided by (totCost from subtotaled DEPARTMENTCODE) ??


Also when I do receieve the value from the recap, how do i align it under a certian column?

UPDATE: The report successfully ran with a recap in the subfooting and it did appeared... just in the next line and not under the column PercProf

This message has been edited. Last edited by: Charles Richards,


WebFOCUS 7.6
Windows, All Outputs