Focal Point
[CLOSED] Derived Facts

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

May 13, 2009, 11:31 AM
AMARNATH_EL
[CLOSED] Derived Facts
Hi,

I want an advice on how to deal with the Derived Facts?

Suppose I have a table sales_daily with the below facts

trancount
volume
profit
loss

I want to create derived facts like ytd_volume,ytd_trancount,lastyear_volume,lastyear_trancount...etc

According to the Datawarehouse Guide the author suggests to create these derived facts in the BI Tool and the tool will take care for you.

My question is what is the best practise in WebFOCUS? Do you we need to create these derived facts in the SYNONYM or create them in the database itself?

All of you advice is really appreciated.

Thanks,
Amarnath

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


WebFOCUS 7.6.7
Unix
Excel/Html
May 13, 2009, 11:50 AM
GinnyJakes
I hope you have a date in your table. You would use a DEFINE or COMPUTE to calculate the new facts/fields that you desire. For instance:

YTD_VOLUME/I9=IF year-of-date EQ CURRENT_YEAR THEN VOLUME ELSE 0;

Note that this is all pseudo-code and you will have to contruct your date values that you would use in your calculations.

Hope this helps.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
May 13, 2009, 01:44 PM
AMARNATH_EL
Thanks for the reply Ginny.

We can do that but I want a suggestion on the best practise. Is it better to do in WF or in the Database?


WebFOCUS 7.6.7
Unix
Excel/Html
May 14, 2009, 09:16 AM
GinnyJakes
For the situation you have described, since you have to compare to a date, do it in the report request, not the metadata.

If you are asking whether you should put it in a view in the data base, certainly that would be better if you can do that. That gives WF less work to do.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google