Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] 12 Month Rolling Earned Premium

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] 12 Month Rolling Earned Premium
 Login/Join
 
Member
posted
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.
John

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8008
Windows, All Outputs
 
Posts: 14 | Registered: April 10, 2014Report This Post
Virtuoso
posted Hide Post
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 amount

This 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, 2013Report This Post
Guru
posted Hide Post
John,

Are you doing an Earned Premium Triangle or just a linear report?


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Member
posted Hide Post
Thanks! We are just doing a linear report currently. I will give MartinY's code a shot. Wish me luck!

John


WebFOCUS 8008
Windows, All Outputs
 
Posts: 14 | Registered: April 10, 2014Report This Post
Member
posted Hide Post
Success! Thanks MartinY.

John


WebFOCUS 8008
Windows, All Outputs
 
Posts: 14 | Registered: April 10, 2014Report This Post
Virtuoso
posted Hide Post
Always a pleasure to help


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, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] 12 Month Rolling Earned Premium

Copyright © 1996-2020 Information Builders