Focal Point
[CLOSED] How To Summarise ROW TOTALS

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

November 21, 2014, 02:02 AM
Gaurav
[CLOSED] How To Summarise ROW TOTALS
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 Tyagi

This 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

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
November 21, 2014, 04:32 AM
Gaurav
Thanks for reply Ram,

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

(sum(Dealer_Cost)+sum(Retail_Cost))/(sum(Sales)+sum(Sales))

Thanks & Regards,
Gaurav Tyagi


WebFOCUS 8.1.05
Windows, All Outputs