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] Highest - Plus Others

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Highest - Plus Others
 Login/Join
 
Member
posted
Hello Experts,
I've been through the boards and drudged up this PLUS OTHERS for use with HIGHEST. Thought it was grand for my top n report, but the default layout isn't what I was hoping for.

This is the layout I want:

Sales Office
$500 Detroit
$300 Chicago
$200 Miami
$400 Other

I've been playing with it and this is as close as I can get to the required layout:

 
TABLE FILE SALES_TOT
PRINT SALES OFFICE
BY HIGHEST 3 SALES NOPRINT
PLUS OTHERS as 'Other'
ON TABLE PCHOLD FORMAT PDF 


If I use the code as above, it places the other in the fourth row as I'd intended, but it then puts the fourth sales office on the 'Other' line.

Let me know if a CAR example would help. thanks in advance.

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


Webfocus 8.0.9
 
Posts: 9 | Registered: December 03, 2010Report This Post
Expert
posted Hide Post
Good:

TABLE FILE CAR
PRINT SEATS MODEL
BY HIGHEST 3 SALES
PLUS OTHERS AS 'OTHERS'
END

Bad:

TABLE FILE CAR
PRINT SALES SEATS MODEL
BY HIGHEST 3 SALES NOPRINT
PLUS OTHERS AS 'OTHERS'
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Hi John,

Here's a way to do this without using the "PLUS OTHERS" feature.

This shows you the top 3 countries from the CAR file based on RETAIL_COST.

-*
TABLE FILE CAR
SUM RETAIL_COST
BY COUNTRY
ON TABLE HOLD AS HLD_SUM
END
-*
TABLE FILE HLD_SUM
PRINT
COUNTRY
COMPUTE TOP_RNK/I5 = IF TOP_RNK LT 3 THEN TOP_RNK + 1 ELSE 99999;
COMPUTE TOP_DSC/A10 = IF TOP_RNK LE 3 THEN COUNTRY ELSE 'OTHER';
BY HIGHEST RETAIL_COST
ON TABLE HOLD AS HLD_RNK
END
-*
TABLE FILE HLD_RNK
SUM RETAIL_COST
BY TOP_RNK NOPRINT
BY TOP_DSC AS 'COUNTRY'
END
-EXIT

~Jim


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Member
posted Hide Post
I can see some value for the plus others in certain situations - just not what I'm trying to acheive this time around.

the best 'plus others' can offer is not ideal:
  
TABLE FILE CAR
PRINT SALES MODEL
BY HIGHEST 3 SALES
PLUS OTHERS AS 'OTHERS'
END



But Jim that's a great solution...and likely the way I'll end up going with it. Thanks for your help.


Webfocus 8.0.9
 
Posts: 9 | Registered: December 03, 2010Report This Post
Expert
posted Hide Post
With a bit of manipulation, you can use PLUS, if you hold the results.

TABLE FILE CAR
PRINT SALES MODEL
BY HIGHEST 3 SALES AS 'RANK'
PLUS OTHERS AS 'OTHERS'
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS TMP_DATA FORMAT ALPHA
END

TABLE FILE TMP_DATA
SUM COMPUTE OTHERS/I9 = MAX.E04 ; NOPRINT
PRINT COMPUTE TMODEL/A24 = IF OTHERS EQ E04 THEN 'OTHERS' ELSE MODEL ; AS MODEL
      SALES
BY E04 NOPRINT
END


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report 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] Highest - Plus Others

Copyright © 1996-2020 Information Builders