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.
I'm having trouble getting the percentages right in the last column. I do need to keep the format basically the same but minor tweaks or major redo ideas welcome.
DEFINE FILE GGORDER
ORDERCNT/I8=1;
8_OZ/I8=IF SIZE EQ 8 THEN 1 ELSE 0;
12_OZ/I8=IF SIZE EQ 12 THEN 1 ELSE 0;
YEAR/YY=ORDER_DATE;
END
TABLE FILE GGORDER
HEADING
"percent of reports products that are 8oz"
"need percent to calc correctly in last row-total column"
SUM
ORDERCNT/I8C
8_OZ/I8C
12_OZ/I8C
COMPUTE PCT_8OZ/D8%=(8_OZ/ORDERCNT)*100;
BY YEAR
BY PACKAGE AS ''
BY PRODUCT_CODE AS 'Product'
ACROSS PACKAGE_TYPE AS ''
ACROSS SIZE AS ''
WHERE SIZE GT 7 AND SIZE LT 20
-*WHERE PRODUCT_CODE EQ 'G$*'
ON PACKAGE RECOMPUTE AS '*subtotal'
ON SIZE RECOMPUTE AS '*TOTAL'
ON TABLE SET PAGE-NUM OFF
ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END
This message has been edited. Last edited by: Kerry,
8105 Tomcat and AIX reporting server input: Teradata, SQL, DB2, Essbase, Oracle, text output:html, excel, PDF,
Its back...The ACROSS field column totals appear to work, but the ROW-TOTAL (last columns) calc the percents wrong.This message has been edited. Last edited by: KenFR,
8105 Tomcat and AIX reporting server input: Teradata, SQL, DB2, Essbase, Oracle, text output:html, excel, PDF,
I passed this to our experts and was suggested that we do not see the problem when running in 7702. If you need additional assistance, please open a case with Customer Support Services. You may either call at 1-800-736-6130, or access online at InfoResponse.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
Some additional suggestion from our technicals may be of help: The code looks good but there should not be a ROW_TOTAL to calculate that value going across. That needs to be recomputed or another compute field needs to be set up to calculate that value. There use to be a SUMMARIZE command that would probable work here.
Cheers,
Kerry
Kerry Zhan Focal Point Moderator Information Builders, Inc.
Posts: 1948 | Location: New York | Registered: November 16, 2004
I looked at your code and made a slight modification that might work for you:
DEFINE FILE GGORDER
ORDERCNT/I8=1;
8_OZ/I8=IF SIZE EQ 8 THEN 1 ELSE 0;
12_OZ/I8=IF SIZE EQ 12 THEN 1 ELSE 0;
YEAR/YY=ORDER_DATE;
SP1/A1 = ' ';
END
TABLE FILE GGORDER
HEADING
"percent of reports products that are 8oz"
"need percent to calc correctly in last row-total column"
SUM
ORDERCNT/I8C
8_OZ/I8C
12_OZ/I8C
COMPUTE PCT_8OZ/D8%=(8_OZ/ORDERCNT)*100;
BY YEAR
BY PACKAGE AS ''
BY PRODUCT_CODE AS 'Product'
ACROSS SP1 AS ''
ACROSS PACKAGE_TYPE AS ''
ACROSS SIZE AS ''
WHERE SIZE GT 7 AND SIZE LT 20
-*WHERE PRODUCT_CODE EQ 'G$*'
ON PACKAGE RECOMPUTE AS '*subtotal'
ON SIZE RECOMPUTE AS '*TOTAL'
ON TABLE SET PAGE-NUM OFF
ON SP1 RECOMPUTE AS 'TOTAL'
-*ON TABLE ROW-TOTAL AS 'TOTAL'
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END
Tried to bold the code added, but it is not working.