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, AmarnathThis 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.
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.