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 want to produce totals for all rows using only a few selected columns.
When I use COMPUTE after ACROSS my output shows the 'NET SALES' row description with the corresponding reporting period values.
A new column 'LTM' is displayed on the extreme right.
The next row, and all others following, are missing the row descriptions, ie EBIT, EBITDA, etc. Corresponding values are displayed, but offset one column to the left. Also, the totals are not coming through for the 'LTM' column, except for the last row and even then I cannot reconcile the total shown.
When I remove the COMPUTE phrase entirely, all row descriptions are displayed with values lined up appropriately.
Does anyone know why suppression of row descriptions is happening? My code is shown below.
TABLE FILE HOLD5 SUM NETSALESA AS 'NET SALES' OVER EBIT AS 'EBIT' OVER EBITDA AS 'EBITDA' OVER *** etc *** RETURN_EQTY AS 'RETURN ON EQUITY' ACROSS FINDATADATE AS ' ' COMPUTE LTM/P9CB=C2 + C3; AS 'LTM' WHERE STATEDATEYR EQ CURRYR OR STATEDATEYR EQ LASTYR OR STATEDATEYR EQ LASTYR2 OR STATEDATEYR EQ LASTYR3 OR STATEDATEYR EQ LASTYR4 OR STATEDATEYR EQ LASTYR5 WHERE NAMEU CONTAINS '&AWCOMPANY' ON TABLE SET ONLINE-FMT PDF *** etc ***
Hopefully at a glance someone can see what is happening here. I'm using version 5.2.4. Thanks, vickie
Posts: 37 | Location: Springfield, MA | Registered: December 03, 2004
LTM, the COMPUTE value, is short for 'last twelve months'. My report details quarterly earnings for a particular company, showing quarterly periods across with financial data items top to bottom. I want to add the values in 4 columns, representing total net sales, etc, of the past 4 quarters. This 12 month total may or may not represent fiscal year numbers, depending on the most recent quarter I am reporting on.
Posts: 37 | Location: Springfield, MA | Registered: December 03, 2004
I do not know of any reason why this would be happening, unless of course, there is a problem with referencing columns in a COMPUTE when using OVER. Every conceivable thing I could think of when testing would not work.
However, there is a solution that would definitely work for you, the McGyver technique.
I quickly mocked up one using some of my own financial data at my location and it worked great.
When creating your master, you should use the number of categores as the OCCURS. In this example, 3 works because of the three categories identified (NETSALESA, EBIT, EBITDA). You should increase accordingly, depending on the categories.
Assuming that your first hold file containing your financial data is STEP1, the following DEFINE will work for you:
DEFINE FILE STEP1 CATEGORY/A9 = IF CTR EQ 1 THEN 'NET SALES' ELSE IF CTR EQ 2 THEN 'EBIT' ELSE IF CTR EQ 3 THEN 'EBITDA' ELSE FIN_DATA/format MISSING ON = IF CTR EQ 1 THEN NETSALESA ELSE IF CTR EQ 2 THEN EBIT ELSE IF CTR EQ 3 THEN EBITDA ELSE MISSING ; END
TABLE FILE STEP1 SUM FIN_DATA BY CATEGORY ACROSS FINDATADATE AS ' ' COMPUTE LTM/P9CB=C2 + C3; AS 'LTM' ... END
One thing I failed to mention was that in the creation of the hold file STEP1 (which contains all of your data), you need to include a joinkey field, such as