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.
lets say I have: Jan Feb Mar Aprl units: 100 100 0 0
where I have 100 units for present and past months, and want to predict Units in the future with some basic math on a delta. Expected Result: Jan Feb Mar Aprl units: 100 100 0 0 future: 100 100 105 110
If I use LAST units: COMPUTE future/I3 = IF date LE today THEN units ELSE LAST units+delta; Jan Feb Mar Aprl units: 100 100 0 0 future: 100 100 105 5
If I LAST future: COMPUTE future/I3 = IF date LE today THEN units ELSE LAST future+delta; Jan Feb Mar Aprl units: 100 100 0 0 future: 100 100 0 0
Am I missing a intersect command or something that I can use?This message has been edited. Last edited by: Kathleen Butler,
_____ WF 8.1.04 Win 7// Windows Server 2012 R2 SASS OLAP Cube
There's a FORECAST function in WF that does this type of stuff. Moving Average, single, double and triple exponential smoothing and Linear Regression. You can find the syntax for it in the documentation.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
Can you post your actual code, or use the car file to create a sample. From what you wrote as your compute, it looks like the third option is correct. The problem might be in the way that you are ordering your data.
Thanks!
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
So I have it working with 3 computes to show 3 months out:
COMPUTE future1/I6 = IF Date_Calendar_Month_YYYYMM LE &CURYM THEN Leased ELSE LAST Leased + Lease_Begin - Lease_End; OVER
COMPUTE future2/I6 = IF Date_Calendar_Month_YYYYMM LE &FUTURE1 THEN future1 ELSE LAST future1 + Lease_Begin - Lease_End; OVER
COMPUTE future3/I6 = IF Date_Calendar_Month_YYYYMM LE &FUTURE2 THEN future2 ELSE LAST future2 + Lease_Begin - Lease_End; OVER
I thought that it didn't like the recursive reference, but I have CAR working using the recursive;
TABLE FILE IBISAMP/CAR
SUM
MPG
COMPUTE CUMMULATIVE_MPG/D6 = MPG + LAST CUMMULATIVE_MPG;
BY CAR
END
_____ WF 8.1.04 Win 7// Windows Server 2012 R2 SASS OLAP Cube
What are your BY fields? It could have to do with the way you have organized those.
As you've noticed the problem isn't in the recursiveness of the statement since you have it working as expected with the car file.
At this point I think the best way for us to give you answers is for you to post your code. We can probably find your issue pretty fast if you do that.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
The problem could also be in your fields TODAY and DATE. What format are they? Are they actually YYM? or are they Alphas for April May June etc? Its possible that the comparison is failing, giving you unites instead of FUTURE + DELTA....
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
TABLE FILE LAHOLD1
SUM
Notice_For_Move_Out AS 'Notice For Move Out' OVER
Skipped_Lease AS 'Skipped Lease' OVER
Eviction_Count AS 'Eviction Count' OVER
Lease_End AS 'Leases Expire' OVER
LEASE_BEGIN_NEW_LEASE AS 'Leases Begin - New Leases' OVER
LEASE_BEGIN_RENEWAL AS 'Leases Begin - Renewal' OVER
Lease_Begin AS 'Leases Begin - Total' OVER
COMPUTE RENEWAL_RATIO_PCT/D12.2% = 100 * Renewal_Ratio__; AS 'Renewal Ratio %' OVER
Leased/I6 OVER
COMPUTE future1/I6 = IF Date_Calendar_Month_YYYYMM LE &CURYM THEN Leased ELSE LAST Leased + Lease_Begin - Lease_End; OVER
COMPUTE future2/I6 = IF Date_Calendar_Month_YYYYMM LE &FUTURE1 THEN future1 ELSE LAST future1 + Lease_Begin - Lease_End; OVER
COMPUTE future3/I6 = IF Date_Calendar_Month_YYYYMM LE &FUTURE2 THEN future2 ELSE LAST future2 + Lease_Begin - Lease_End; OVER
Vacant OVER
Units/I7 OVER
Left_To_Lease AS 'Left To Lease'
ACROSS LOWEST Date_Calendar_Month_YYYYMM NOPRINT AS 'YYYYMM'
ACROSS LOWEST Date_Calendar_Month_YYYYMM AS 'Month'
Dates, and &var are I6. IE) &CURYM = 201602.
Tony may have it. I am displaying across Month and I want to go to the last month's value.
I know having 3 computes isn't optimal, but is there strong argument against using the 3 computes and showing the 3rd one?
_____ WF 8.1.04 Win 7// Windows Server 2012 R2 SASS OLAP Cube
Use a hold file. The order of the data is extremely important when using last. Make your dates BY fields and remove the overs. Hold the data and then put your across back in. like this:
TABLE FILE LAHOLD1
SUM
Notice_For_Move_Out
Skipped_Lease
Eviction_Count
Lease_End
LEASE_BEGIN_NEW_LEASE
LEASE_BEGIN_RENEWAL
Lease_Begin
COMPUTE RENEWAL_RATIO_PCT/D12.2% = 100 * Renewal_Ratio__;
Leased/I6
COMPUTE future1/I6 = IF Date_Calendar_Month_YYYYMM LE &CURYM THEN Leased ELSE LAST Leased + Lease_Begin - Lease_End;
COMPUTE future2/I6 = IF Date_Calendar_Month_YYYYMM LE &FUTURE1 THEN future1 ELSE LAST future1 + Lease_Begin - Lease_End;
COMPUTE future3/I6 = IF Date_Calendar_Month_YYYYMM LE &FUTURE2 THEN future2 ELSE LAST future2 + Lease_Begin - Lease_End;
Vacant
Units/I7
Left_To_Lease
BY LOWEST Date_Calendar_Month_YYYYMM
ON TABLE HOLD AS LAHOLD2
END
TABLE FILE LAHOLD2
SUM
Notice_For_Move_Out AS 'Notice For Move Out' OVER
Skipped_Lease AS 'Skipped Lease' OVER
Eviction_Count AS 'Eviction Count' OVER
Lease_End AS 'Leases Expire' OVER
LEASE_BEGIN_NEW_LEASE AS 'Leases Begin - New Leases' OVER
LEASE_BEGIN_RENEWAL AS 'Leases Begin - Renewal' OVER
Lease_Begin AS 'Leases Begin - Total' OVER
RENEWAL_RATIO_PCT OVER
Leased/I6 OVER
future1 OVER
future2 OVER
future3 OVER
Vacant OVER
Units/I7 OVER
Left_To_Lease AS 'Left To Lease'
ACROSS LOWEST Date_Calendar_Month_YYYYMM NOPRINT AS 'YYYYMM'
ACROSS LOWEST Date_Calendar_Month_YYYYMM AS 'Month'
END
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013