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.
In the sample code below, I want the YTDSALES field to disregard the WHERE selection for MONTH EQ '08' i.e. I want the WHERE MONTH EQ '08' to apply to the MTDSALES and BUDGETSALES fields but for YTDSALES field, I want it to add up values WHERE MONTH LE '08' or disregard the MONTH EQ '08' statement all together. Any suggestions on how this can be achieved?
TABLE FILE SALES SUM MTDSALES YTDSALES BUDGETSALES BY REGION BY COSTCENTER WHERE COSTCENTER EQ 'ABC' WHERE MONTH EQ '08' ENDThis message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.10 Windows all output (Excel, HTML, PDF)
Pretty simple. I would assume(probably incorrectly) that you are "NOT" hard-coding the Month, so I will assume it is another ampere variable, along with a Year(maybe?):
TABLE FILE SALES
SUM
COMPUTE XMTDSALES/P13.2MC = IF YEAR EQ '&YEAR' AND MONTH EQ '&MONTH' THEN MTDSALES ELSE 0; AS 'MTDSALES'
COMPUTE XYTDSALES/P13.2MC = IF YEAR EQ '&YEAR' AND MONTH LE '&MONTH' THEN YTDSALES ELSE 0; AS 'YTDSALES'
COMPUTE XBUDGETSALES/P13.2MC = IF YEAR EQ '&YEAR' AND MONTH EQ '&MONTH' THEN BUDGETSALES ELSE 0; AS 'BUDGETSALES'
COMPUTE FLAG/A1 = IF XMTDSALES EQ 0 AND XYTDSALES EQ 0 AND XBUDGETSALES EQ 0 THEN 'N' ELSE 'Y'; NOPRINT
BY REGION
BY COSTCENTER
WHERE COSTCENTER EQ 'ABC';
WHERE TOTAL FLAG EQ 'Y';
-* WHERE MONTH EQ '08'
END
WHERE statements end with a semi-colon, though, until IBI does some code-tightening, it will work without one.