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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Computed Field Issue

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Computed Field Issue
 Login/Join
 
Member
posted
Hi.
One of our users is having issues getting a virtual field to work correctly in InfoAssist. It seems to be correct on the surface, and our in-house IBI developer (15+ years experience) believes it should work, but it's not.

This is the "code":
IF ( InputYear LT 2013 ) THEN ( 0.052 * RevenueTotal ) ELSE
IF ( InputYear EQ 2013 ) THEN ( 0.051 * RevenueTotal ) ELSE
IF ( InputYear EQ 2014 ) THEN ( 0.051 * RevenueTotal ) ELSE
IF ( InputYear GT 2014 ) THEN ( 0.056 * RevenueTotal ) ELSE 0

To be clear, the fields used (InputYear and RevenueTotal are also virtual fields. The return is applying the 0.056 math to all years regardless of how we set up the statements...with and without the parens, etc.

These are the results... as you can see the math is wrong on the Administrative Expense for all years except 2015:

2009
Revenue Total
$18,706,352

Administrative Expense
$1,047,556


2010
Revenue Total
$22,570,546

Administrative Expense
$1,263,951


2011
Revenue Total
$26,278,346

Administrative Expense
$1,471,587


2012
Revenue Total
$32,619,378

Administrative Expense
$1,826,685


2013
Revenue Total
$34,495,318

Administrative Expense
$1,931,738


2014
Revenue Total
$39,521,818

Administrative Expense
$2,213,222


2015
Revenue Total
$44,029,503

Administrative Expense
$2,465,652
**************************************
Any help is greatly appreciated.

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


WebFOCUS 8.0, Windows
Excel, HTML, PDF
 
Posts: 11 | Registered: December 15, 2015Report This Post
Master
posted Hide Post
I'm assuming that you DO have the semi-colon at the end of your define in the actual code?

How about:

IF InputYear EQ 2013 OR 2014 THEN 0.051 * RevenueTotal ELSE
IF  InputYear LT 2013  THEN  0.052 * RevenueTotal 
ELSE  0.056 * RevenueTotal;


I'm not a fan of unnecessary brackets, but they shouldn't make any difference here I don't think.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
 
Posts: 674 | Location: Guelph, Ontario, Canada ... In Focus since 1985 | Registered: September 28, 2010Report This Post
Virtuoso
posted Hide Post
What's the format for InputYear? Try converting InputYear to an A4 and then create the compute using that.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Master
posted Hide Post
Sue,

are these COMPUTEs or DEFINEs?

If they are COMPUTEs the "InputYear" is multiplied by the number of lines in your dataset. Just like "SUM InputYear".

You might want to

IF ( FST.InputYear ...  ..) THEN .. ELSE


G'luck.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Computed Field Issue

Copyright © 1996-2020 Information Builders