As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I'm sure this is pretty basic, but it's been a while since I've had my WF hat on! I can certainly sum the Amount column, but it's the weighting of the Return that has me stymied.
Each Return value is multiplied by it's corresponding Amount. The sum of these products is then divided by the sum of the Amount column.
A DEFINE? A RECAP? A COMPUTE?
TIA...This message has been edited. Last edited by: Kerry,
Posts: 21 | Location: Springfield, MA | Registered: August 17, 2004
(C) is the sum of (A) (D) is the sum total of each product (A)*(B), which is then divided by (C) to obtain the correct weighted average return. We can't calculate this until the total amount is known. It is similar to how one would calculate this in Excel, using the =SUMPRODUCT() function.
I'll need to brush up on knowing which WF keywords operate on data as it is retrieved vs when all is retrieved.
Thanks, all. Keep the good advice coming!
Posts: 21 | Location: Springfield, MA | Registered: August 17, 2004
I'm not sure how this technique would not solve your problem. You need a formula that is COMPUTEd in the TABLE FILE section, which identifies how your Return is derived.
Then the ON TABLE RECOMPUTE AND SUB-TOTAL will total all of your Amounts, and recalculate a weighted (total) Return based on the COMPUTE formula.
Let me know if I am missing something here.
Sean
------------------------------------------------------------------------ PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
Posts: 210 | Location: Ottawa | Registered: November 03, 2005
i agree with smiths, if B results from a COMPUTE statement in your fex, then ON TABLE SUMMARIZE or ON fieldname RECOMPUTE will recrank the proper result. How is your B determined? Is B static or is it COMPUTEd in your fex? You would want to COMPUTE your field, and very specifically not DEFINE it; A static, or DEFINEd field won't recompute easilyThis message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
You need a defined field that multiplies A * B, then in your table request, sum the field, and then compute a new field that divides the defined field by A. I have an example if you want to see it.
Jen
Release 5.2.4 Upgrading to 7.6
Posts: 68 | Location: Springfield MA | Registered: May 07, 2003