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     [SOLVED] Rounding SUB-TOTAL AVE.s

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Rounding SUB-TOTAL AVE.s
 Login/Join
 
Master
posted
Folks,
I am finding out about WebFOCUS and it's idiosyncrasies with rounding. I have a simple table that effectively holds numerator and denominator fields that I calculate to a percent using a Define statement (as a P8 so rounding will go up/down as normal). I am trying to do a simple ON BYFIELD SUB-TOTAL AVE. PERCENT at the end to average out those Percents, but it does not round as expected. Short of a manual COMPUTE, how can I easily force the formatting to P8? I've been reading years old posts all morning, and I just can't believe that we're still working around the same old problems.

DEFINE FILE VW_INDICATORMETRICVALUES_NUMDEM
	QUARTER/I4 = IF MONTH FROM 10 TO 12 THEN 1
				 ELSE IF MONTH FROM 1 TO 3 THEN 2
				 ELSE IF MONTH FROM 4 TO 6 THEN 3
				 ELSE 4;

	QUARTERA/A1 = FTOA(QUARTER, '(I4)', QUARTERA);

	QUARTERLONG/A11 = IF QUARTER EQ 1 THEN QUARTERA | 'st Quarter'
				 ELSE IF QUARTER EQ 2 THEN QUARTERA | 'nd Quarter'
				 ELSE IF QUARTER EQ 3 THEN QUARTERA | 'rd Quarter'
				 ELSE QUARTERA | 'th Quarter';

	FISCALYEAR/I4 = IF QUARTER EQ 1 THEN YEAR + 1 ELSE YEAR;

	PRINTMONTH/A2 = EDIT(MONTH, '$$$$$$$$$99');
	PRINTYEAR/A4  = EDIT(YEAR, '$$$$$$$9999');
	PRINTDATE/A7  = PRINTMONTH | '/' | PRINTYEAR;

	PERCENT/P8    = (NUM_VALUE / DEM_VALUE) * 100;
	
END

TABLE FILE VW_INDICATORMETRICVALUES_NUMDEM
PRINT
	NUM_VALUE 
	DEM_VALUE 
	PERCENT

	BY ORGUNITSHORTNAME 
	BY QUARTER
	BY MONTH NOPRINT
	BY PRINTDATE

WHERE ORGENTITYNO EQ '70';
WHERE INDICATORNAME EQ 'MedRec';
WHERE FISCALYEAR EQ 2010;

-* Works pretty Good but AVE. PERCENT does not round.
ON ORGUNITSHORTNAME RECOMPUTE SUB-TOTAL SUM. NUM_VALUE SUM. DEM_VALUE AVE. PERCENT AS '* FISCAL YEAR :'
ON QUARTER RECOMPUTE SUB-TOTAL SUM. NUM_VALUE SUM. DEM_VALUE AVE. PERCENT AS '* QUARTER :'
ON TABLE RECOMPUTE

END
-EXIT


- ABT

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


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Master
posted Hide Post
No replies, huh?

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report This Post
Expert
posted Hide Post
Nope, after all these years I still haven't seen WebFOCUS perform "magic".

How are we suppose to assist if you don't use a common data file from IBISAMP?

You need to use RECAP and SUBFOOT...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Master
posted Hide Post
@Tom :-) Got me there, touche'. I'll give that a try and if I can't get it off the ground, I'll post back something with CAR/Employee. Thanks!

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
 
Posts: 561 | Registered: February 03, 2010Report 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     [SOLVED] Rounding SUB-TOTAL AVE.s

Copyright © 1996-2020 Information Builders