Update Forecast version with budget

Post Reply
dfrench77
Posts: 52
Joined: Thu Feb 17, 2011 2:52 pm
OLAP Product: TM1
Version: 9.5
Excel Version: 2007

Update Forecast version with budget

Post by dfrench77 »

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"
tomok
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

Post by tomok »

dfrench77 wrote:CellPutN(NVALUE, 'Operating Expenses v2','FORECASTS',V2,V3,Location,Department,AssumptionPeriods,Account,'Amount');
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.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
dfrench77
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

Post by dfrench77 »

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
tomok
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

Post by tomok »

dfrench77 wrote:I would you suggest that I update the AssumptionPeriods in the while statement loop?
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...?
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
dfrench77
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

Post by dfrench77 »

Tomok,

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.
What does the variable AssumptionPeriods represent?
It represents a date string e.g. "12-12-18".
Where does the original value in that variable come from? etc...?
The original value in the variable comes from the dimension elements. I not sure this answers your question. Please clarify.


Please let me know if there is any additional information that I cam provide.

Regards,

Desi
Post Reply