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.
Hello to everybody..!! I want to know if there is a way to operate the result shown by the "row-total" using across ?? because I need to get a percentage of that value. Thanks
Product: WF 7.1.1 DB: Oracle 9i
Posts: 24 | Location: El Salvador | Registered: March 28, 2006
Could you please give us more details of what you would like to do.
Here is some sample code that may be of help:
TABLE FILE CAR
SUM
DEALER_COST
PCT.DEALER_COST/D4% AS 'PCT_COST'
BY COUNTRY
ON TABLE HOLD
ON TABLE SET ASNAMES ON
END
TABLE FILE HOLD
SUM
DEALER_COST
PCT_COST AS '%'
ROW-TOTAL
ACROSS COUNTRY AS ''
HEADING
" "
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF,
FONT='ARIAL', SIZE=8, $
ENDSTYLE
END
Strangely, the PCT. prefix does not work when used directly with an ACROSS, you have to use a BY and create a HOLD file.
Someone else may have a better idea.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
PCT. works fine with ACROSS. It gives you the percentage the value is based on the total for the column.
TABLE FILE CAR SUM DEALER_COST PCT.DEALER_COST BY COUNTRY ACROSS SEATS AS '' ON TABLE COLUMN-TOTAL ON TABLE SET STYLESHEET * TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=8, $ ENDSTYLE END
ttfn, kp
Access to most releases from R52x, on multiple platforms.
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003
TABLE FILE CAR
SUM
DEALER_COST
PCT.DEALER_COST/D4% AS 'PCT_COST'
AND ROW-TOTAL
ACROSS COUNTRY
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=8, $
ENDSTYLE
END
gives me
COUNTRY
ENGLAND FRANCE ITALY JAPAN W GERMANY TOTAL
DEALER_COST PCT_COST DEALER_COST PCT_COST DEALER_COST PCT_COST DEALER_COST PCT_COST DEALER_COST PCT_COST DEALER_COST PCT_COST
--------------------------------------------------------------------------------
37,853 100% 4,631 100% 41,235 100% 5,512 100% 54,563 100% 143,794 500%
Not what I was expecting - all percentages are 100% except the row total, which is 500%.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Yes, with one row of data PCT. doesn't make much sense. 37,853 is 100% of 37,853 (the total for the column). Try RPCT. instead. It gives you the percent based on the total for the row.
TABLE FILE CAR SUM DEALER_COST RPCT.DEALER_COST/D4% AS 'PCT_COST' AND ROW-TOTAL ACROSS COUNTRY ON TABLE SET PAGE NOLEAD ON TABLE SET STYLESHEET * TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=8, $ ENDSTYLE END
kp, thanks for the tip on RPCT. Until you mentioned that, I assumed that PCT was the only way to get a percentage, hence why I thought it made sense to use PCT in one row.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server