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.
My issue is I have to calculate the percentage by dividing the subtotal of column A to (subtotal of column B + subtotal of column C) and display it in the header. This is my sample source code:
TABLE FILE TABLE_TEMP
SUM
CNT.FIELDA WITHIN FIELDB WITHIN FIELDC
BY LOWEST FIELDD NOPRINT
BY LOWEST FIELDB
ACCROSS LOWEST FIELDC
ON FIELDD SUBTOTAL AS '*TOTAL'
HEADING
"Percentage: "
ON TABLE PCHOLD FORMAT HTML
The result I got is:
FIELDB FIELDC_VALUE1 FIELDC_VALUE2 FIELDC_VALUE3
ValueA 4 2 3
ValueB 5 1 7
ValueC 6 3 2
*Total 15 6 12
The requirement I got is I need to calculate the percentage based on the total I got : 15 / ( 6 + 12) = 83% then display 83% in the HEADING.
Could you guys please help me out on this issue? Thanks in advance.This message has been edited. Last edited by: <Kathryn Henning>,
I agree with my friend "New Jersey" , multi verb requests are easier [for my brain] to understand; and also, note that whenever you want to put a calculated thing into a heading, then put the HEADING commands at the bottom your your fex, after all the crunching. That way, the reporting matrix actually has access to the number you've just crunched.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
To be honest, I don't know how to use multi-verb in my case. I am trying to get something like C1 / (C2 + C3) to get the total value of each column but no luck. The ACROSS makes a litlle bit confuse here, I can't get Total value of column 1 or 2.
use the car file, when you want to give an example. SET ASNAMES = ON TABLE FILE CAR SUM SALES AS TOTSALES SUM SALES AS SUBTOTSALES BY COUNTRY SUM SALES BY COUNTRY BY CAR END now take a look at what you have in the 3 data columns, and see how easy it is now to make calculations of shares. If you do this sort of thing in a single pass at the data, you can use NOPRINTS on the totals columns, but they're still available to use. remember with mutliple verbs that the BY fields must match: BY a BY a BY b BY a BY b BY c, etc.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003