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.
Here is my report code, with field names altered for easy reading:
SET RANK=SPARSE TABLE FILE STUDENTDATA SUM CNT.STUDENT_ID NOPRINT SUM CNT.STUDENT_ID AS '#Enrolled' COMPUTE PERCENT/F6.2% = (C2/C1)*100; AS "Percent" RANKED BY TOTAL HIGHEST 10 CNT.STUDENT_ID NOPRINT BY REFERRING_HIGH_SCHOOL AS 'High School' COLUMN-TOTAL AS 'Total of Top Schools'
The expression (C2/C1) gives me the percentage that each row makes up of the TOTAL number of students. I need to know what percentage it represents out of only the limited list of top ten referring schools. I cannot, for the life of me, figure out how to reference the displayed column-total, which is limited to only the displayed fields.
I haven't found a way to do a separate compute, because I cannot predict that the top ten will have exactly ten entries - ties inflate the list up to potentially 15 (or more).
Any ideas?
Thanks!This message has been edited. Last edited by: CAWarner,
You cannot reference a total created internally by the matrix.
To perform what you want you need to create the total by yourself, hold it, then merge it to the detailed rows and have both type of line with an unique id type (let say id = 1 for detail and id = 2 for total). Then you'll be able to reference row id=2 as part of your calculation.
Or use other technique such as maybe the MacGyver one. Not sure if it's possible with that method...
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Don't know if may suit your need, but at least it's a start:
SET RANK=SPARSE
-SET &RNK = 3;
-SET &TOTRNK = 0;
TABLE FILE CAR
SUM CNT.MODEL AS 'CNTDATA'
RANKED BY TOTAL HIGHEST &RNK CNT.MODEL NOPRINT
BY CAR NOPRINT
ON TABLE HOLD AS RNKTOT FORMAT BINARY
END
-RUN
-SET &NBROWS = &LINES;
-REPEAT DOTOT &NBROWS TIMES
-READFILE RNKTOT
-SET &TOTRNK = &TOTRNK + &CNTDATA;
-TYPE &TOTRNK
-DOTOT
TABLE FILE CAR
SUM CNT.MODEL NOPRINT
SUM CNT.MODEL AS 'NbModel'
COMPUTE PCT/F6.2% = (C2 / C1) * 100; AS 'Percent'
COMPUTE PCT/F6.2% = (C2 / &TOTRNK) * 100; AS 'PercentOfRank'
RANKED BY TOTAL HIGHEST &RNK CNT.MODEL
BY CAR
ON TABLE COLUMN-TOTAL AS 'Total' RECOMPUTE
END
-RUN
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013