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] Calculating percentage of grades for report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Calculating percentage of grades for report
 Login/Join
 
Member
posted
I need assistance computing a summary report with the grades for a specific term and the percentage of records that received a grade. For instance,
C or Better - the count may be 1000 and next to it I want it to say that is 25% of the total amount of records that received this type of grade. D - the count is 700 and to say this is 20% of the total mount of records that received this type of grade and so forth . . . Below is what I have thus far.

JOIN
AS_ACADEMIC_HISTORY_DETAIL.SUBJ_CODE
AND AS_ACADEMIC_HISTORY_DETAIL.CRSE_NUMBER
AND AS_ACADEMIC_HISTORY_DETAIL.CRN_KEY IN AS_ACADEMIC_HISTORY_DETAIL
TO UNIQUE
AS_CATALOG_SCHEDULE.SUBJ_CODE
AND AS_CATALOG_SCHEDULE.CRSE_NUMBER
AND AS_CATALOG_SCHEDULE.CRN_KEY IN AS_CATALOG_SCHEDULE
AS J0
END

JOIN
AS_ACADEMIC_HISTORY_DETAIL.SUBJ_CODE
AND AS_ACADEMIC_HISTORY_DETAIL.CRSE_NUMBER
AND AS_ACADEMIC_HISTORY_DETAIL.CRN_KEY IN AS_ACADEMIC_HISTORY_DETAIL
TO UNIQUE
SSBSECT_SUBJ_CODE
AND SSBSECT_CRSE_NUMB
AND SSBSECT_CRN IN SSBSECT
AS J1
END

DEFINE FILE AS_ACADEMIC_HISTORY_DETAIL ADD
GRADEA/A20V=IF GRDE_CODE_FINAL EQ 'A' OR 'B' OR 'C' THEN 'C or Better' ELSE
IF GRDE_CODE_FINAL EQ 'D' THEN '%D's' ELSE
IF GRDE_CODE_FINAL EQ 'F' OR 'FN' THEN '%F's' ELSE
IF GRDE_CODE_FINAL EQ 'W' OR 'WU' THEN '%W's';
END

TABLE FILE AS_ACADEMIC_HISTORY_DETAIL
HEADING CENTER
"Fayetteville State University"
"Grade Distribution Report for SUM
'CNT.AS_ACADEMIC_HISTORY_DETAIL.AS_ACADEMIC_HISTORY_DETAIL.GRDE_CODE_FINAL'
AS 'GRADE,COUNT'
BY AS_ACADEMIC_HISTORY_DETAIL.COLL_DESC
AS 'COLLEGE'
ACROSS 'AS_ACADEMIC_HISTORY_DETAIL.AS_ACADEMIC_HISTORY_DETAIL.GRDE_CODE_FINAL'
AS 'GRADE'

WHERE ( AS_ACADEMIC_HISTORY_DETAIL.AS_ACADEMIC_HISTORY_DETAIL.TERM_CODE_KEY EQ '&TERM' )
AND (SSBSECT_SSTS_CODE EQ 'A')
AND (AS_ACADEMIC_HISTORY_DETAIL.AS_ACADEMIC_HISTORY_DETAIL.GRDE_CODE_FINAL EQ 'A' OR 'B' OR 'C' OR 'D' OR 'F' OR 'FN' OR 'W' OR 'WU' );

ON AS_ACADEMIC_HISTORY_DETAIL.AS_ACADEMIC_HISTORY_DETAIL.COLL_DESC SUBTOTAL AS '*GRAND TOTAL'

ON AS_ACADEMIC_HISTORY_DETAIL.COLL_DESC SKIP-LINE

ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT EXL2K OPEN
ON TABLE SET STYLE *
TYPE=REPORT,FONT=ARIAL,
TITLETEXT='Grades By College',$
ENDSTYLE
FOOTING
" "
" "
"This report pulls all grades for students by College/School"
" "
" "
END

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 27 | Registered: January 10, 2017Report This Post
Virtuoso
posted Hide Post
This can be one way and where you can decide not to display the "Total" column (NOPRINT instead of : AS 'Total')
DEFINE FILE CAR
DUMMY  /A1 = '';
NCNTRY /A10 = DECODE COUNTRY ('W GERMANY' 'West' 'JAPAN' 'West' 'FRANCE' 'France' 'ENGLAND' 'England' 'ITALY' 'Italy');
END
TABLE FILE CAR
SUM RETAIL_COST AS 'Total'
BY DUMMY  NOPRINT
SUM RETAIL_COST
    COMPUTE PCT_OF_TOT /P6.2C% = C2 / C1 * 100;
BY DUMMY  NOPRINT
BY NCNTRY
END
-RUN


Note : when you share code, please use the code tag (right most icon on the ribbon) :
</>


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, 2013Report This Post
Platinum Member
posted Hide Post
Example using GGSALES ...

DEFINE FILE GGSALES
T_M/M      = DATE;
T_CNT/I7SC = 1;
C_CNT/I7SC = IF T_M EQ  1 OR  2 OR  3 OR  4 OR  5 THEN 1 ELSE 0;
D_CNT/I7SC = IF T_M EQ  6                         THEN 1 ELSE 0;
F_CNT/I7SC = IF T_M EQ  7 OR  8 OR  9             THEN 1 ELSE 0;
W_CNT/I7SC = IF T_M EQ 10 OR 11 OR 12             THEN 1 ELSE 0;
END
-*
TABLE FILE GGSALES
SUM 
C_CNT AS 'C or Better,Count'
COMPUTE C_PCT/D6.2% = C_CNT / T_CNT * 100; AS 'C or Better,Percent'
D_CNT AS '~~D~~,Count'
COMPUTE D_PCT/D6.2% = D_CNT / T_CNT * 100; AS '~~D~~,Percent'
F_CNT AS '~~F~~,Count'
COMPUTE F_PCT/D6.2% = F_CNT / T_CNT * 100; AS '~~F~~,Percent'
W_CNT AS '~~W~~,Count'
COMPUTE W_PCT/D6.2% = W_CNT / T_CNT * 100; AS '~~W~~,Percent'
T_CNT AS 'Total,Count'
COMPUTE T_PCT/D6.2% = T_CNT / T_CNT * 100; AS 'Total,Percent'
BY CATEGORY
ON TABLE RECOMPUTE
END


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report 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] Calculating percentage of grades for report

Copyright © 1996-2020 Information Builders