Let's Get Social!
Focal Point    Focal Point Forums    WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] How to COMPUTE Growth Rate with across table
 Go New Search Notify Tools Reply
 [CLOSED] How to COMPUTE Growth Rate with across table
Member
 posted December 22, 2010 10:00 PM
Dears,
I'm a webfocus beginner,I have a rebort need to designe like this

1997 compare growth rate
leve branch v1 v2 v1/v2 v1 v2 v1/v2
1 a 5 8 0.625 3 4 0.75 0.75/0.625 -1
b
c

my code is
TABLE FILE HOLD_KPI_2
SUM
V1/D12C
V2/D12C
COMPUTE rate/D12.2% = V1 / V2 * 100;
BY GROUP_ID
BY LEVEL_DEC
BY ID
BY NAME
ACROSS GROUP

anyone could told me how to Calculate growth rate whit compute?

thanks a lot

This message has been edited. Last edited by: Kerry,

WebFOCUS 7.6
Windows, All Outputs

 Posts: 6 | Registered: December 20, 2010 IP
Platinum Member
 posted December 23, 2010 02:17 AM Hide Post
Not clear enough to me.
Can you post an example with CAR?

WF 7.7.02 on Windows 7
HTML,PDF,EXCEL,AHTML

 Posts: 165 | Registered: September 29, 2008 IP
Member
 posted December 23, 2010 05:09 AM Hide Post
like
TABLE FILE CAR
SUM
DEALER_COST
RETAIL_COST
COMPUTE V1/D12.2 = DEALER_COST / RETAIL_COST;
BY COUNTRY
ACROSS CAR
compute v2/D12.2%=

WHERE CAR EQ 'ALFA ROMEO' OR 'AUDI';

and I need to add compute v2
which is V1(FOR AUDI) / V1 (FOR ALFA ROMEO) -1 (LIKE GROTH RATE)

In my case is across by time dimension
THNKS A LOT

WebFOCUS 7.6
Windows, All Outputs

 Posts: 6 | Registered: December 20, 2010 IP
Master
 posted December 23, 2010 02:14 PM Hide Post
I think this is a simple arithmetic issue:

COMPUTE rate/D12.2% = V1 / V2 * 100;

should be:

COMPUTE RATE/D12.2 = (V2 - V1) / V1 * 100;

WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP

 Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010 IP
Member
 posted December 23, 2010 09:13 PM Hide Post
but,in across table it would like

CAR
ALFA ROMEO AUDI
COUNTRY DEALER_COST RETAIL_COST V1 DEALER_COST RETAIL_COST V1 V2
--------------------------------------------------------------------------------
ITALY 16,235 19,565 .83 . . . ?
W GERMANY . . . 5,063 5,970 .85 ?

I don't how to get V1 from ALFA ROMEO and AUDI
to compute rate as v2

WebFOCUS 7.6
Windows, All Outputs

 Posts: 6 | Registered: December 20, 2010 IP
Master
 posted December 24, 2010 09:35 AM Hide Post
Hmmm.... something is getting lost in translation here. You say you want to calculate a growth rate, so I assume you have a value you want to find has increased by a given amount or the percentage of an increase. Of course if you want to calculate changes in rates of growth and how they affect a final outcome you are in the realm of calculus and numerical analysis and I can't help you there.

I'm still unclear what the DEALER_COST / RETAIL_COST gets you, except a value that would normally be less than zero... You say your ACROSS is a time dimension but I don't see one anywhere. Maybe you could try and restate your problem in words, rather than code and someone could help you out.

WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP

 Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010 IP