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     conditional statements in RECAP

Read-Only Read-Only Topic
Go
Search
Notify
Tools
conditional statements in RECAP
 Login/Join
 
<kj>
posted
Can any one elp me in finding a solution for this.

I have to display rank based on the score for each group at summary row of the group. Here is the sample code from my RECAP statement.
X1 is the group average. I am trying to find a rank for the group average with IF .. THEN .. ELSE statemens. I am always getting 0 istead of getting 5.

X1/P8.2 = -.41;
RNK/I2 = IF X1 GE -200.00 AND X1 LE -8.61 THEN 7 ELSE IF X1 GE -8.60 AND X1 LE -.42 THEN 6 ELSE IF X1 GE -.41 AND X1 LE 15.78 THEN 5 ELSE IF X1 GE 15.79 AND X1 LE 28.24 THEN 4 ELSE IF X1 GE 28.25 AND X1 LE 39.13 THEN 3 ELSE IF X1 GE 39.14 AND X1 LE 55.66 THEN 2 ELSE IF X1 GE 55.67 AND X1 LE 200.00 THEN 1 ELSE 0;

I am using wf 5.32 on win2k.
A quick response is heighly appreciated.

Thanks,
kj
 
Report This Post
Virtuoso
posted Hide Post
The GE tests, after the first line, are extraneous (and may be the root of the problem, since Focus is probably using floating-point throughout) -- what happens when you run with X1 at an interior point, such as -.43?

Instead of
RNK/I2 =<br />     IF X1 GE -200.00 AND X1 LE  -8.61 THEN 7<br />ELSE IF X1 GE   -8.60 AND X1 LE   -.42 THEN 6<br />ELSE IF X1 GE    -.41 AND X1 LE  15.78 THEN 5<br />ELSE IF X1 GE   15.79 AND X1 LE  28.24 THEN 4<br />ELSE IF X1 GE   28.25 AND X1 LE  39.13 THEN 3<br />ELSE IF X1 GE   39.14 AND X1 LE  55.66 THEN 2<br />ELSE IF X1 GE   55.67 AND X1 LE 200.00 THEN 1<br />ELSE 0;                            
simplify it to
RNK/I2 =<br />     IF X1 LT -200.00 THEN 0<br />ELSE IF X1 LE   -8.61 THEN 7<br />ELSE IF X1 LE    -.42 THEN 6<br />ELSE IF X1 LE   15.78 THEN 5<br />ELSE IF X1 LE   28.24 THEN 4<br />ELSE IF X1 LE   39.13 THEN 3<br />ELSE IF X1 LE   55.66 THEN 2<br />ELSE IF X1 LE  200.00 THEN 1<br />ELSE 0; 
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report 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     conditional statements in RECAP

Copyright © 1996-2020 Information Builders