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     [RESOLVED]Total of highest 5 values

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[RESOLVED]Total of highest 5 values
 Login/Join
 
Platinum Member
posted
I want to get the total of the highest 5 balances, so I used

TABLE FILE XXX
SUM
BALANCES
BY HIGHEST 5 BALANCES AS ' ' NOPRINT


But this prints all 5 of the balances. I just want to TOTAL of the 5 highest balances (one row totaling the highest 5 BALANCES on the DB). What am I doing wrong?

This message has been edited. Last edited by: Ted Michalski,


7.7.02
Windows
EXCEL, PDF, CSV, TEXT
 
Posts: 106 | Registered: June 25, 2009Report This Post
Virtuoso
posted Hide Post
Need two steps.

  TABLE FILE CAR
PRINT SUM  SALES  
BY HIGHEST 2 SALES NOPRINT 
ON TABLE HOLD AS SALES  
-*
END
TABLE FILE SALES
SUM SALES AS TOTAL,SALES
END


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Gold member
posted Hide Post
If you only want to see the value and not use it later on could do something like this (This will only get top 5 unique values though and any duplicates will not be counted):

TABLE FILE CAR
SUM SALES
BY HIGHEST 5 SALES NOPRINT
ON TABLE SUBFOOT RECOMPUTE
END


WF: 8201, OS: Windows, Output: HTML, PDF, Excel
 
Posts: 78 | Registered: November 08, 2010Report This Post
Virtuoso
posted Hide Post
If I may put in my 2 cents:
  
TABLE FILE CAR
BY HIGHEST 5 SALES 
ON TABLE HOLD AS SALES  
END
TABLE FILE SALES
SUM SALES
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 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     [RESOLVED]Total of highest 5 values

Copyright © 1996-2020 Information Builders