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 want to rank on the top ten "number of returns" column and lump all other rows into an "All Others" row. Not a problem using ranking, but, unfortunately, two of the top ten "number of returns" have the same value, therefore, displaying 12 rows (11 ranked and the "All Others" row. How can I force the ranking to only display the 10 rows with repeating ranked values for the two that have the same "number of returns" and add the extra row (11th) into the "All Others" row on the table.This message has been edited. Last edited by: Ted Michalski,
Ted The problem is that you have a duplicate in, say, row 3. Therefore you end up with 11 rows plus others. However, this scenario changes when the duplicate row is the 10th row. Does that mean you only want to display the first item in row 10, but not display the second with the same attributes.
Logically it is impossible to achieve what you require.
Other than running through a HOLD file and using a count, I cannot think of a single pass approach.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
I have the following ranked by "number of returns" number of returns Rank Model A 72 1 Model B 51 2 Model C 50 3 Model D 48 4 Model E 29 5 Model F 29 5 Nodel G 27 6 Model H 20 7 Model I 18 8 Model J 16 9 Model K 10 10 All Others 650 11+
You can see that WF set the rank of 5 for both Model E abnd Model F because they have the same number of returns. Therefore, the table displays all 11 Models and the All Others row. I just want to display Model A - J and force WF to lump Model K into the All Others row. How can I use a hold file to do this?
APP FILEDEF TESTMAS DISK testdata.mas
-RUN
-WRITE TESTMAS FILENAME=TESTDATA,SUFFIX=FIX
-WRITE TESTMAS SEGNAME=TESTDATA,SEGTYPE=S0
-WRITE TESTMAS FIELDNAME=MODEL ,ALIAS=MODEL ,FORMAT=A7 ,ACTUAL=A7 ,$
-WRITE TESTMAS FIELDNAME=RETURNS ,ALIAS=RETURNS ,FORMAT=I5 ,ACTUAL=A3 ,$
-*
APP FILEDEF TESTDATA DISK testdata.ftm
-RUN
-WRITE TESTDATA Model A 51
-WRITE TESTDATA Model B 48
-WRITE TESTDATA Model C 29
-WRITE TESTDATA Model D 20
-WRITE TESTDATA Model E 16
-WRITE TESTDATA Model F 09
-WRITE TESTDATA Model G 07
-WRITE TESTDATA Model H 06
-WRITE TESTDATA Model I 05
-WRITE TESTDATA Model J 03
-WRITE TESTDATA Model K 01
-WRITE TESTDATA Model P 02
-WRITE TESTDATA Model Q 04
-WRITE TESTDATA Model R 05
-WRITE TESTDATA Model S 07
-WRITE TESTDATA Model T 08
-WRITE TESTDATA Model U 10
-WRITE TESTDATA Model V 18
-WRITE TESTDATA Model W 27
-WRITE TESTDATA Model X 29
-WRITE TESTDATA Model Y 50
-WRITE TESTDATA Model Z 72
-RUN
-*
TABLE FILE TESTDATA
SUM
COMPUTE RANKX/I5 = IF (LAST RANKX GE 10) THEN 11 ELSE (LAST RANKX + 1);
COMPUTE MODELX/A10 = IF (LAST RANKX GE 10) THEN 'All Others' ELSE MODEL ;
BY HIGHEST RETURNS
BY MODEL
ON TABLE HOLD AS RANKDATA
END
-*
DEFINE FILE RANKDATA
RANK/A6 = IF (RANKX EQ 11) THEN (FTOA(RANKX,'(F5)','A5') || '+') ELSE FTOA(RANKX,'(F5)','A5');
END
TABLE FILE RANKDATA
SUM RETURNS
BY LOWEST RANKX NOPRINT
BY RANK
BY MODELX AS 'MODEL'
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=RANK, JUSTIFY=CENTER, $
ENDSTYLE
END
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007