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 am trying to create a trending chart that displays two year's worth of days of 12 month cumulative premium. I would have one data point for the premiums earned from today's date back 365 days (ignoring leap year) and another point from yesterday's date back 365 days, then two days ago and so on...
Would it be best to use MacGyver to create all of the days using a giant table or should I try calculating one of the endpoint's annual total then when I go to process the next day, I increment the prior day's total by the one end point's premium amount and decrementing that by the other end point's premium amount?
Both ways sound like a lot of processing.
Thanks for your advice. JohnThis message has been edited. Last edited by: <Kathryn Henning>,
Yes, should be a lot of processing because you'll have to read your data 365 times to include proper period of time to create your premium total per day...
Here little code that can be used to calculate the from/to dates for the WHERE clause:
-SET &DATE = &YYMD;
-SET &I = 0;
-LOOP
-SET &I = &I + 1;
-SET &STDATE = AYMD(&DATE, -&I, 'I8');
-SET &ENDATE = AYMD(&STDATE, -365, 'I8');
-TYPE &STDATE, &ENDATE
-SET &PREM&I = 0;
TABLE FILE X
SUM PREMIUM
WHERE DATE GT &ENDATE AND DATE LE &STDATE;
ON TABLE HOLD AS RESULT FORMAT ALPHA
END
-READFILE RESULT
-SET &PREM&I - &PREMIUM;
-IF &I LT 365 THEN GOTO LOOP;
You then have one variable per day with the premium amountThis message has been edited. Last edited by: MartinY,
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