Sei sulla pagina 1di 14

Calculation rule question -- @allocation

This question is Not Answered.

956222 Feb 8, 2015 5:03 PM


Gurus

I am new to calculation scripts in planning. I have a requirement to build a calculation rule.

I have three intersections :

#1: Budget -> Remain to Spend -> FY16


#2: Budget -> Duration Months -> FY16
#3: Budget -> startdate -> FY16

Intersection number 1 will have dollar amount which are remained to be spent for the next year.
Client enters the duration months.
The start date is interfaced from a seperate interface.
The requirement is to spread or allocate the remain to spend amount based on the start date to number of months
(duration months).

To be more clear :
for example : #int1 : Remaint to spend is $1,00,000 #int 2: duration months is 10 and #int3: start date is
07/01/2016.

so the business rule should spread or allocate $1M/10 = $100,000 each to Jul, August, sep, oct, nov, dec of
2016 and jan thru june of 2017.

My question is if this can be achieved ?

The start date is stored as 20160107. I need to map 2016 to FY16 etc. I am not sure if I am thinking in right way.

TIA gurus please lead me in a right direction.

Thanks
SV

118 Views
Tags:

Average User Rating: No ratings (0 ratings)


Average User Rating
No ratings
(0 ratings)

1. Re: Calculation rule question -- @allocation

Madhu.Meesala Feb 9, 2015 4:00 AM (in response to 956222)


Hi there,

I am not part of development, but one of my friend has documented some thing
related to dates in the link.
Hyperion Planning and More...: Why these dates functions are not working for my
Planning Application

Hope this will be useful..!!

Thanks,
Mady
o
o

Like Show 0 Likes (0)


Actions

2. Re: Calculation rule question -- @allocation

956222 Feb 9, 2015 4:20 PM (in response to Madhu.Meesala)


Thanks for pointing out Mady. The documents gives me information but not
specifically related to my question. Thanks Again.

Thanks
SV
o
o

Like Show 0 Likes (0)


Actions

3. Re: Calculation rule question -- @allocation

956222 Feb 9, 2015 10:09 PM (in response to 956222)


Did anyone see such issue and has found a solution ?

Thanks
SV
o
o

Like Show 0 Likes (0)


Actions

4. Re: Calculation rule question -- @allocation

myjim Feb 9, 2015 10:52 PM (in response to 956222)


Hi SV

From what I understand it is very doable as I have developed something very similar
in the past. I was depreciating assets at a certain rate over period and years.
I would start with 3 accounts as you stated above. But for the date I used Smartlist to
for the users to select the year and the period.

Are you having issues with the calculation or more on how to go about it writing the
calculation?

Regards

Jimmy
o
o

Like Show 0 Likes (0)


Actions

5. Re: Calculation rule question -- @allocation

956222 Feb 10, 2015 8:48 AM (in response to myjim)


Jimmy

Thanks for response.

Its is almost similar, but the startdate, duration months and Remain to spend are
members of a non-account dimension by the name Logistics.

Period is a standard dimension.

Account member for this case is a task which has a status via smartlist and it has a
start date, duration months and dollar amount.

So the requirement is to look for the task`s start date and spread the dollar amount
based on the duration months to those many months beginning start year and month.

For example a tasks start date is 08/01/2017 and duration is 15 months and dollar
amount is $300,000. So the rule should spread $20,000 to all the months from

FY17->Aug thru FY18 -> Oct

I dont know if I am able to interpret the question right.

I started with the defining following variables:

*********************************************************************
*********************************************************************
************************************

VAR VarYear1, VarMonth1, VarDate1, VarDurMonths, VarStartDate, VarStartYear,


VarStartMonth, VarNoOfDays, VarRTS, VarMonAlloc;

FIX ("FN_00000" , "LO_000000" , "FD_200" , "Stage 1" , "Budget" ,


&ProposedYear,"Start Date","Duration Months","CIP Remain To Spend",
"CC_42250", "PR_AB010000" );

"BegBalance"

IF (@ISCHILD("Total CIP Task"))

VarStartDate = "Start Date" ;

VarDurMonths = "Duration Months" ;

VarRTS = "CIP Remain to Spend";

VarYear1 = @ROUND(VarStartDate/10000,0);

VarMonth1 = @ROUND((VarStartDate-VarYear1*10000)/100,0);

VarDate1 = VarStartDate-(VarYear1*10000+VarMonth1*100);

VarStartYear = @DatePart(VarYear1, DP_YEAR);

VarStartMonth = @DatePart(VarMonth1, DP_Month);

VarMonAlloc = VarRTS/VarDurMonths;

ENDIF ;

ENDFIX;

*********************************************************************
*********************************************************************
*************************************************

Now the next part is to spread VarMonAlloc to all the VarstartYear ->VarStartMonth
increasing until it reached VarDurMonths.

Thanks

SV
o
o

Like Show 0 Likes (0)


Actions

6. Re: Calculation rule question -- @allocation

Celvin Kattookaran Feb 10, 2015 2:54 PM (in response to 956222)


There was a similar request here Re: is there any way to use smarlist values in fix
statement??
He was looking for a way to do this for start month and end month. your's is similar
however you'll have to do a month add and then perform this in if logic.

If you've Calc Manager 11.1.2.3.502 and above then it has some date functions which can perform date
addition. The issue for you will be is to determine when to swap years. When I did this once, I knew
that planners can't plan for more than 2 years, so I had that flexibility to fix years and perform 12duration > 0 logic. If it is true then for current year start from start month till December. next year
start from jan till end month.

You can try that logic, or you'll need a custom cdf which can compare years. I did create one which can
compare years. Essbase String to Number CDF ~ Oracle - Hyperion Labs...... get the alias of current
member and compare it with end year and run your logic.

Regards

Celvin Kattookaran
o
o

Like Show 0 Likes (0)


Actions

7. Re: Calculation rule question -- @allocation

Anthony Dodds Feb 11, 2015 1:44 PM (in response to 956222)


Hi

What version are you on?

Please note that the date is actually stored as YYYYMMDD not as you have said,
regardless if you have your dates as MM/DD/YYYY or DD/MM/YYYY.

In Calc Manger there is a CDF called @CalcMgrAddMonths that you could use.

So to get the "end date" you say @CalcMgrAddMonths("StartDate","Duration


Months");, then you could create a system setup form where you have the period end
dates (Create another date account) against all your year and month combinations.
Then in your calc you can say IF the Period End >= Start Date AND Period End <=

End Date then make what ever you are calculation equal to remaining spend /
duration.

So in your example you would get $100,000 only in the months that fall in the range
between the start and end date. So your start date of July 1st would be 20160701, it
would add 10 months to get an end date of 20170501 (1st May 2017). These dates can
then be tested against the Period End Dates you would have set against each of your
Year and Month combinations and only place data between the range.

Thanks

Anthony
o
o

Like Show 0 Likes (0)


Actions

8. Re: Calculation rule question -- @allocation

956222 Feb 16, 2015 7:28 PM (in response to Celvin Kattookaran)


Thanks for this Celvin. I will try this and will let you know how this goes. As you said
the years is definitely an issue. Thanks again.

SV
o
o

Like Show 0 Likes (0)


Actions

9. Re: Calculation rule question -- @allocation

956222 Feb 16, 2015 7:31 PM (in response to Anthony Dodds)


Anthony thanks for the response.

I actually have an end date already. I am calculating the duration months based on the
start date and enddate (@HSpDateDiff function).

I kind of unclear on your suggestion of creating -- system where I have year and
month combinations. How do I do it ?

Thanks
SV
o
o

Like Show 0 Likes (0)


Actions

10. Re: Calculation rule question -- @allocation

956222 Feb 16, 2015 8:27 PM (in response to Celvin Kattookaran)


Celvin

I tried something like this .... I first wanted to just do it for one Entity (member with
CC_*******) and one program (PR_*********) combination if it works then I will
repeat... The year might be still an issue here ..

*********************************************************************
***************************************
//ESS_LOCALE English_UnitedStates.Latin1@Binary
VAR VarYear1, VarMonth1, VarDate1, VarStartDate, VarStartYear, VarStartMonth,
VarNoOfDays, VarRTS, VarMonAlloc;
VAR VarDurMonths =0;
FIX ("Current Service Level" , "FT_0" , "FN_00000" , "LO_000000" , "FD_200" ,
"Stage 1" , "Budget" , &ProposedYear,"Start Date","Duration Months","CIP Remain
To Spend", "CC_00000", "PR_AB000000" );
"BegBalance"

(
IF (@ISMBR(@CHILDREN(("Total CIP Task"))))

VarStartDate = "Start Date" ;


VarDurMonths = "Duration Months" ;
VarRTS = "CIP Remain to Spend";

VarYear1 = @ROUND(VarStartDate/10000,0);
VarMonth1 = @ROUND((VarStartDate-VarYear1*10000)/100,0);
VarDate1 = VarStartDate-(VarYear1*10000+VarMonth1*100);

VarStartYear = @DatePart(VarYear1, DP_YEAR);


VarStartMonth = @DatePart(VarMonth1, DP_Month);

VarMonAlloc = VarRTS/VarDurMonths;

LOOP (VarDurMonths)

VarYear1->VarMonth1 = VarMonAlloc;

ENDLOOP;
ENDIF ;
)
ENDFIX;
*********************************************************************
*******************************************

I am not sure If I am going in the right direction. And also it throws an error. May be
issue with LOOP. Error: 1200324 Error compiling formula for [BegBalance] (line 24):
operator expected after [LOOP]

TIA .. !!

Thanks
SV
o
o

Like Show 0 Likes (0)


Actions

11. Re: Calculation rule question -- @allocation

Celvin Kattookaran Feb 18, 2015 10:14 AM (in response to 956222)


You cannot perform a crossdim operation on variables. Variable are going to give you
only numbers, so not sure what you are trying to achieve there. also why are you
using the math and datepart? Is this a planning application?

Regards

Celvin Kattookaran
o
o

Like Show 0 Likes (0)


Actions

12. Re: Calculation rule question -- @allocation

956222 Feb 20, 2015 3:47 PM (in response to Celvin Kattookaran)


Yes Celvin. This is a planning application. Since it is a PLanning app I am trying to
extract the year and month from the values stored in Essbase as it is dtored in
gregorian calendar type.

Potrebbero piacerti anche