Focal Point
Using previous Row calculated value in webfocus

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

October 15, 2007, 10:05 AM
Srinivasan_Munuswamy
Using previous Row calculated value in webfocus
Hi,
I have a table where in we have return percentage. I need to create a report where in i need show a row like the below.
Q7 Q8 Q9 Q10 ...
Rs1000invested 5000 6000 4000 5000 ...

Wherein "rs1000invested" values are computed from the oracle table for the last six quarters


Oracle table and their columns
quartercde return%
q1 55 (r1)
q2 47 (r2)
. . (r3)
. .
. .
q12 74 (r12)

I need to do the below calculation for the last 6 quarters

for q7 -- > (1+r1)*1000
for q8 --> (1+r1)*1000*(1+r2)
for q9 --> (1+r1)*1000*(1+r2)*(1+r3)
.
.
.
upto q12


How will I do this in webfocus?

It will be great if I get the solution . Thanks in advance

Srini M


WF 8.0.0.9 Database : oracle

CURRENT:
WebFOCUS 8.0.0.9 /oracle 11 i

October 15, 2007, 10:12 AM
susannah
textbook perfect case for Financial Modelling Language (FML), which comes as part of WebFOCUS.(and has been part of the FOCUS language since ... forever... and FOCUS is the only language to have such a thing).
Look up Financial Modelling Language in the manuals (maybe someone from Doc Serv will come along and tell you which one) and you'll have a whole new world opened to you. It lets you write excel-like equations that reference row and column values in your output data. its very cool.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID