I have row totals and columns totals. I am computing a new field and it is ratio of two existing fields. Down below the result is fine as I changed it to summarize but row totals are giving me sum(A/B) of the ratios but I need sum(A)/sum(B).
Please Help.
Thanks & Regards, Gaurav TyagiThis message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 8.1.05 Windows, All Outputs
November 21, 2014, 03:34 AM
Ram Prasad E
You need to use another COMPUTE to get this instead of ROW-TOTAL. Check below code.
APP PATH IBISAMP
TABLE FILE CAR
SUM
COMPUTE RC_BY_S/D12.2=RETAIL_COST/SALES;
COMPUTE DC_BY_S/D12.2=DEALER_COST/SALES;
COMPUTE ROW_TOTAL/D12.2=(DEALER_COST+RETAIL_COST)/(SALES+SALES);
BY COUNTRY
ON TABLE SUMMARIZE
END
I have one more Across PERIOD along side with By COUNTRY field too when I apply this method I get the result according to first value of the accross field. I need a method which does this