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.
Or this, if you need to reset the running total (and if the data is in the correct order for the report):
TABLE FILE CAR
SUM
SALES
COMPUTE SALES_RT/D6 = IF COUNTRY EQ LAST COUNTRY THEN SALES_RT + SALES ELSE SALES;
RETAIL_COST
COMPUTE RETAIL_COST_RT/D6 = IF COUNTRY EQ LAST COUNTRY THEN RETAIL_COST_RT + RETAIL_COST ELSE RETAIL_COST;
BY COUNTRY
BY CAR
END
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
What if I need to reset the total not just on country, but to only include records in the total that have a date that fall within a specific range in relation to the date of the record?
For example: -the total for row 1 would have a total of all records that have a date value in the in the last 7 days from that date value (12/24/2013 to 01/01/2014). -the total for row 2 would have a total of all records that have a date value in the in the last 7 days from that date value (12/25/2013 to 01/02/2014).
If you can translate "total of all records that have a date value in the in the last 7 days from that date value (12/24/2013 to 01/01/2014)" into an IF statement you should be able to put that in the COMPUTE.
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
Maybe you should move your COMPUTE into a DEFINE instead...
Because you're now testing based on a date, COMPUTE will use the last or first (can't remember which one is stored in the Matrix when not specified) date from your WHERE selection.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013