Focal Point Banner


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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
odd compute value
 Login/Join
 
Master
posted
I'm getting some very exaggerated numbers from the following compute statement.
COMPUTE MARGIN_GOAL/P11BM = (PROJECTED_SALES * GM_PERC); AS 'Margin,Goal $'

If I run it in SQL against our iSeries, I get a very small number compared to the number webfocus is showing.


Here's an except from my master file, if it's any help. I figure it may have something to do with this packed decimal value.

FIELDNAME=PROJECTED_SALES, ALIAS=PROJECTED_SALES, USAGE=P22.6, ACTUAL=P11,
MISSING=ON, $
FIELDNAME=GM_PERC, ALIAS=GM_PERC, USAGE=P7.3, ACTUAL=P8,
MISSING=ON, $


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Virtuoso
posted Hide Post
Jason

can you post the whole script you run?
both the SQL statement and the FEX.

Frank




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Virtuoso
posted Hide Post
As Frank asks. If you are computing, this occurs after an aggregation occurs if any 'by' statements, and if you have joins involdve you could be 'multiplying the data occurances.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Master
posted Hide Post
Leah's may be right,
I think that what could be happening is it's aggregating PROJECTED_SALES, then aggregating GM_PERC, then multiplying. kind of a silly order of operations. If this is true, is there any way to make it do the aggregation on the multiplied value?

my fex is massive (1000 loc), but here's a short excerpt, I hope it gets the point across.
TABLE FILE MATRIX_ORDERS_TBL
SUM
EXT_SALES_DOLLARS/P11BM AS 'Sales,Actual'
COMPUTE MARGIN_GOAL/P11BM = (PROJECTED_SALES * GM_PERC); AS 'Margin,Goal $'
BY HIGHEST YEARMONTH AS 'Month'
yields 40,000,000,000 or so.

Sql:
SELECT
yearmonth,
sum(projected_sales*gm_perc)
FROM
SQLPROD.MATRIX_ORDERS_TBL
where
yearmonth = 200709
group by
yearmonth;

yields:
200709 5,379,209.191409199

This message has been edited. Last edited by: Jason K.,


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Virtuoso
posted Hide Post
I would like to see what the result in the FEX would be if you do

DEFINE FILE XXX
MARGIN_GOAL/P11BM = (PROJECTED_SALES * GM_PERC);
END

and then use the defined field MARGIN_GOAL in your request.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Master
posted Hide Post
thanks for the thoughts folks. I went ahead and ran a performance monitor on the database to catch all the sql requests.

It shows the request as
SUM(PROJECTED_SALES)
SUM(GM_PERC)

SO, it's doing exactly as leah mentioned. I'm going to have to do the calculation at the row level of the database.

Thanks!


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders