I have created a rule to dynamically feed my actuals amount to my forecast. I used a rule because I want the actual amount in the forecast to be read only. I have created a turbo integrator script to copy my budget amount to my forecast periods. Forecast periods are any period >= current month. I used a turbo integrator process because future forecast period need to writable. Below is my TI script.
Issue: Only the last forecast period is getting updated when I run the TI script.
pnCurrent_Month = CellGetn('Assumption', 'Current Month','Numeric Value');
# How long are the dimensions?
I_DimSiz_Assumption_Period = DimSiz( 'Assumption Item');
# Initialise the counters.
I_Assumption_Periods_Idx = 1;
# Get the name of the Assumption Item element.
psAssumptions_Periods = DimNm ( 'Assumption Item', I_Assumption_Periods_Idx );
# Loop through the Assumption_Periods
pnForecast_Months = Cellgetn('Assumption', psAssumptions_Periods, 'Numeric Value');
While ( I_Assumption_Periods_Idx = I_DimSiz_Assumption_Period);
If (pnForecast_Months >= pnCurrent_Month);
CellPutN(NVALUE, 'Operating Expenses v2','FORECASTS',V2,V3,Location,Department,AssumptionPeriods,Account,'Amount');
Else;
Endif;
I_Assumption_Periods_Idx = I_Assumption_Periods_Idx + 1;
End;
My Text output file
pnCurrent_Month ="19281",
pnForecast_Months = "19281"
Budget Amount = "1"
Update Forecast version with budget
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: Update Forecast version with budget
i don't see anywhere in your code where you are updating the variable AssumptionPeriod. Therefore, in every iteration in your loop you are writing to the same one.dfrench77 wrote:CellPutN(NVALUE, 'Operating Expenses v2','FORECASTS',V2,V3,Location,Department,AssumptionPeriods,Account,'Amount');
-
- Posts: 52
- Joined: Thu Feb 17, 2011 2:52 pm
- OLAP Product: TM1
- Version: 9.5
- Excel Version: 2007
Re: Update Forecast version with budget
Tomok,
Thanks for your insight. Btw - I am an accountant not an information technology guy. I would you suggest that I update the AssumptionPeriods in the while statement loop?
Thanks,
Desi
Thanks for your insight. Btw - I am an accountant not an information technology guy. I would you suggest that I update the AssumptionPeriods in the while statement loop?
Thanks,
Desi
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: Update Forecast version with budget
I assume you mean to say "how" instead of "I". Nevertheless, how would I possibly know? I know nothing about your model. I take it you didn't write this code but instead inherited someone else's handiwork. No one is going to be able to help you without more information. Who wrote the TI? What is the data source for the TI? What does the variable AssumptionPeriods represent? Where does the original value in that variable come from?, etc...?dfrench77 wrote:I would you suggest that I update the AssumptionPeriods in the while statement loop?
-
- Posts: 52
- Joined: Thu Feb 17, 2011 2:52 pm
- OLAP Product: TM1
- Version: 9.5
- Excel Version: 2007
Re: Update Forecast version with budget
Tomok,
Thank for your inquiries. I understand that you are trying to help by getting more information. Below I tried to answer your questions.
I think I lifted the code from a TM1 Forum post. I have used it successfully for other TI scripts. I was trying to incorporate it in a new TI script.
The data source is a TM1 cube view.
Please let me know if there is any additional information that I cam provide.
Regards,
Desi
Thank for your inquiries. I understand that you are trying to help by getting more information. Below I tried to answer your questions.
Who wrote the TI? What is the data source for the TI?
I think I lifted the code from a TM1 Forum post. I have used it successfully for other TI scripts. I was trying to incorporate it in a new TI script.
The data source is a TM1 cube view.
It represents a date string e.g. "12-12-18".What does the variable AssumptionPeriods represent?
The original value in the variable comes from the dimension elements. I not sure this answers your question. Please clarify.Where does the original value in that variable come from? etc...?
Please let me know if there is any additional information that I cam provide.
Regards,
Desi