Focal Point
[SOLVED] Ranking Totals within First By field only

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5777027626

November 30, 2012, 12:17 PM
Joey Sandoval
[SOLVED] Ranking Totals within First By field only
How can I rank total sales by store code and still show the production codes that comprise each rank.
  
DEFINE FILE SALES
TOT_SALES/I5 = UNIT_SOLD * RETAIL_PRICE
END

TABLE FILE SALES
SUM
TOT_SALES
RANKED BY TOTAL HIGHEST TOT_SALES NOPRINT
BY STORE_CODE
-*BY PROD_CODE
END


If you uncomment prod_code it will change the rankings because it is ranking by 2 by fields. I want to preserve the rankings by store_code, but display the prod_codes sold within each store code.

Thank you for your help. I'm still quite new to WF.

This message has been edited. Last edited by: Joey Sandoval,




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro


November 30, 2012, 05:16 PM
Joey Sandoval
I was able to solve with the following multi-verb query.

 
DEFINE FILE SALES
TOT_SALES/I5 = UNIT_SOLD * RETAIL_PRICE;
END

TABLE FILE SALES
SUM
TOT_SALES
RANKED BY TOTAL HIGHEST TOT_SALES NOPRINT
BY STORE_CODE

PRINT  PROD_CODE
BY RANK
BY TOT_SALES

END

 

This message has been edited. Last edited by: Joey Sandoval,




Prod/Dev: WebFOCUS 8.0.08 on Windows Server 2008/Tomcat , WebFOCUS DevStudio 8.0.08 on Windows 7 Pro


November 30, 2012, 05:39 PM
Francis Mariani
Very good - I wouldn't have figured that out.


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
December 01, 2012, 12:14 PM
Danny-SRL
quote:
DEFINE FILE SALES
TOT_SALES/I5 = UNIT_SOLD * RETAIL_PRICE;
END

TABLE FILE SALES
SUM
TOT_SALES
RANKED BY TOTAL HIGHEST TOT_SALES NOPRINT
BY STORE_CODE
ON TABLE HOLD
END
?FF HOLD


A little peek helps...


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