Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Percent of Highest Value
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Percent of Highest Value
 Login/Join
 
Platinum Member
posted
Hello

I am wondering about a simple logic. I got it working but I had it in multiple TABLE requests.
TABLE FILE CAR
SUM
	SALES
BY COUNTRY
ON TABLE HOLD AS H1
END

SET ASNAMES = ON
TABLE FILE H1
SUM
	SALES AS 'TOP_SALES'
BY HIGHEST 1 SALES NOPRINT
BY COUNTRY
ON TABLE HOLD AS H2
END

JOIN
	COUNTRY IN H1 TO
	COUNTRY IN H2 AS J0
END
TABLE FILE H1
SUM
	TOP_SALES NOPRINT
	SALES NOPRINT
	COMPUTE TOP_PRCNT/D12.2% = (TOP_SALES/SALES) * 100;
END  


Just want to learn if it can be done in any other simple way. Please suggest.
Thank you.

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


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 127 | Registered: July 21, 2011Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Not sure to understand exactly what you are looking to perform.

Please share your whole actual "working" multi requests solution.
It may help to understand


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2189 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Try this:
  
DEFINE FILE CAR
PSALES/D8.2=SALES;
END
TABLE FILE CAR
SUM SALES NOPRINT PCT.PSALES
BY TOTAL HIGHEST 1 SALES NOPRINT
BY COUNTRY NOPRINT
END


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

 
Posts: 1934 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Martin, edited my first post. Sorry for the confusion.
quote:
Originally posted by MartinY:
Not sure to understand exactly what you are looking to perform.

Please share your whole actual "working" multi requests solution.
It may help to understand


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 127 | Registered: July 21, 2011Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Danny, this is what I'm looking for. Thank you so much.
quote:
Originally posted by Danny-SRL:
Try this:
  
DEFINE FILE CAR
PSALES/D8.2=SALES;
END
TABLE FILE CAR
SUM SALES NOPRINT PCT.PSALES
BY TOTAL HIGHEST 1 SALES NOPRINT
BY COUNTRY NOPRINT
END


WF 8.2.01 APP STUDIO
PDF,HTML,EXL2K,Active
 
Posts: 127 | Registered: July 21, 2011Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Percent of Highest Value

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.