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 have a monthly trend report that shows 16 months of data that works fine. I want to add to it to include a section below the existing report that shows the sequential variance. The inital reports FML code is as follows:
'CSALW' OR 'SSALW' AS 'Salaries & Wages' LABEL R002 OVER<br />etc...<br />
This part of the report works fine. I tried to add the following to calculate the sequential variances:
RECAP SV002=R002(*-1)-R002(*); AS 'Salaries & Wages' OVER<br />etc.....
I do not get any errors, but I get a result of 0 (zero) for all values instead of the RECAP calculation of the prior column less the current column.
Any suggestions would be appreciated.
Posts: 31 | Location: Denver | Registered: April 11, 2005
Matthew, I too encountered the same problem. I'm wondering whether the use of the *-1 is causing some grief.
You've indicated that you have 16 months of data. If you know this and it's a static number then you could code each cell in the recap line as follows:
(I've screened the data to have 16 occurrences of date to match your situation).
TABLE FILE GGSALES SUM UNITS ACROSS DATE WHERE DATE LE 19970401 ; FOR PRODUCT 'Biscotti' AS 'Biscotti' LABEL R1 OVER 'Latte' AS 'Latte' LABEL R2 OVER RECAP R3(1)=0; AS 'RECAP' OVER RECAP R3(2)=R2(1)-R2(2); AS 'RECAP' OVER RECAP R3(3)=R2(2)-R2(3); AS 'RECAP' OVER RECAP R3(4)=R2(3)-R2(4); AS 'RECAP' OVER RECAP R3(5)=R2(4)-R2(5); AS 'RECAP' OVER RECAP R3(6)=R2(5)-R2(6); AS 'RECAP' OVER RECAP R3(7)=R2(6)-R2(7); AS 'RECAP' OVER RECAP R3(8)=R2(7)-R2(8); AS 'RECAP' OVER RECAP R3(9)=R2(8)-R2(9); AS 'RECAP' OVER RECAP R3(10)=R2(9)-R2(10); AS 'RECAP' OVER RECAP R3(11)=R2(10)-R2(11); AS 'RECAP' OVER RECAP R3(12)=R2(11)-R2(12); AS 'RECAP' OVER RECAP R3(13)=R2(12)-R2(13); AS 'RECAP' OVER RECAP R3(14)=R2(13)-R2(14); AS 'RECAP' OVER RECAP R3(15)=R2(14)-R2(15); AS 'RECAP' OVER RECAP R3(16)=R2(15)-R2(16); AS 'RECAP' END
I found two problems that I had. First, I was not aware that my code apprently has inserted hidden columns, so instead of the 18 columns I thought I had, I actual had 34?? Once I discovered that the following code did work for me:
RECAP SV002(4,34,2)=R002(*-2)-R002(*); AS 'Salaries & Wages' OVER
I beleive you were correct that the '(*-1)' was causing a problem when I was not specifying a starting column of at least 2 because it did not know what to do with a zero or negative column reference.
Now I am puzzled? Since I know I have formatted this report using column specific tags (e.g in my style sheets I have 'Column=N13 ...') and those references indicate to me that I only have 18 columns, why does only the FML portion of the code see 34 columns, inserting a empty column in between each column that the stylesheet recognizes?
Posts: 31 | Location: Denver | Registered: April 11, 2005
You definitely end up with the 'hidden' columns if you have multiple objects for your verb phrase. From your recap, it appears as if you may have had one NOPRINT in your SUM/PRINT since you're incrementing in steps of 2.
In my best guess, the reason the FML portion sees the 34 columns (or is it 36?), is that you can conceivably use the noprinted columns in the calculations. I've done this in the past where I will have two noprinted columns to be used in a recap and my recap is something like this:
RECAP SV002(1,*,3) = R(*+2) or something to that effect.