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] COMPUTE/RECOMPUTE PROBLEM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] COMPUTE/RECOMPUTE PROBLEM
 Login/Join
 
Guru
posted
One of My report calculates the percentages. When I use compute my perentage calculation in procedure doesnt show correct results. I was wondering if you can give me some ideas to resolve this problem.
Following CODE works fine
 TABLE FILE AGG_ENROLLMENT
 SUM
     &UNIT1_FIELD/A25    AS 'UNIT1'
     &UNIT2_FIELD/A25    AS 'UNIT2'
   ENROLLEDACTIVE  AS 'ENROLLED'
-*End Code change for Lsat Week
          EnrolledUnscheduled AS 'UNSCHED'
     NewEnroll           AS 'NEWENROLL'
     Withdraw            AS 'WITHDRAW'
	 &BURST
  BY FYPW
  BY LITM2
  BY LITM3
  BY &UNIT1_FIELD     NOPRINT
  BY &UNIT2_FIELD     NOPRINT
 WHERE &UNIT1_WHFIELD EQ '&UNIT1_VAL'
 WHERE FYPW LE '&FYPW_0'
 WHERE FYP EQ '&FYP_0'
    OR FYP EQ '&FYP_1'
    OR FYP EQ '&FYP_2'
    OR FYP EQ '&FYP_3'
    OR FYP EQ '&FYP_12'
    OR FYP EQ '&FYP_13'
ON TABLE HOLD AS ENRLAGGX FORMAT FOCUS

END
?FF ENRLAGGX
-RUN 



BUT FOLLIWNG CODE messes up percentae calculations in other procedure.

  
TABLE FILE AGG_ENROLLMENT
 SUM
     &UNIT1_FIELD/A25    AS 'UNIT1'
     &UNIT2_FIELD/A25    AS 'UNIT2'

COMPUTE NEWSUM2/D12.2 = 
 IF FYP EQ '&FYP_0' THEN ENROLLEDACTIVE + ENROLLEDUNSCHEDULED  ELSE IF (EDIT(FYPW,'999999') NE '&FYP_0') AND (EDIT(FYPW,'$$$$99$') EQ '03' OR '06' OR '09' OR '12') AND (EDIT(FYPW,'$$$$$$9') EQ '5')  THEN ENROLLEDACTIVE + ENROLLEDUNSCHEDULED  ELSE IF (EDIT(FYPW,'999999') NE '&FYP_0') AND (EDIT(FYPW,'$$$$99$') EQ '01' OR '02' OR '04' OR '05' OR '07' OR '08' OR '10' OR '11') AND EDIT(FYPW,'$$$$$$9') EQ '4'
 THEN ENROLLEDACTIVE + ENROLLEDUNSCHEDULED ELSE 0; AS 'ENROLLED'

          EnrolledUnscheduled AS 'UNSCHED'
     NewEnroll           AS 'NEWENROLL'
     Withdraw            AS 'WITHDRAW'
	 &BURST
  BY FYPW
  BY LITM2
  BY LITM3
  BY &UNIT1_FIELD     NOPRINT
  BY &UNIT2_FIELD     NOPRINT
 WHERE &UNIT1_WHFIELD EQ '&UNIT1_VAL'
 WHERE FYPW LE '&FYPW_0'
 WHERE FYP EQ '&FYP_0'
    OR FYP EQ '&FYP_1'
    OR FYP EQ '&FYP_2'
    OR FYP EQ '&FYP_3'
    OR FYP EQ '&FYP_12'
    OR FYP EQ '&FYP_13'
ON TABLE HOLD AS ENRLAGGX FORMAT FOCUS

END
?FF ENRLAGGX
-RUN

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


WebFOCUS 7.6.10
Windows
HTML
 
Posts: 294 | Registered: March 04, 2010Report This Post
Virtuoso
posted Hide Post
We have no idea what your data or metadata looks like, what values are being filled in for your parameter values, and nowhere in here is there any code indicating anything about a percentage calculation. You've got to be a little more specific about what you're tyring to do and what the problem is before anyone can help you.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report 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] COMPUTE/RECOMPUTE PROBLEM

Copyright © 1996-2020 Information Builders