Page 1 of 1

someone help me to write feeder for this

Posted: Thu May 12, 2011 10:13 am
by kid123
['Target']=N:DB('test ceo',!Year,!Department,!Service Line,!Deliverable Type,!Customer,!CEOD_METRICS,'Budget',!month)
+(DB('test ceo',!Year,!Department,!Service Line,!Deliverable Type,!Customer,!CEOD_METRICS,'Budget',Attrs('Month',!Month,'Previous Period'))
-(DB('test ceo',!Year,!Department,!Service Line,!Deliverable Type,!Customer,!CEOD_METRICS,'New',Attrs('Month',!Month,'Previous Period'))
+DB('test ceo',!Year,!Department,!Service Line,!Deliverable Type,!Customer,!CEOD_METRICS,'Renewed',Attrs('Month',!Month,'Previous Period'))
+DB('test ceo',!Year,!Department,!Service Line,!Deliverable Type,!Customer,!CEOD_METRICS,'Existing',Attrs('Month',!Month,'Previous Period'))));




'Target' is an element in Test ceo cube..Plz give the feeder for this rule with a detailed explanation....I'm very new :?:

Re: someone help me to write feeder for this

Posted: Thu May 12, 2011 12:46 pm
by ajain86
For a rule with addition / subtraction, best practice for a feeder would be to have a separate feeder where each element from the right side feeds the left side.

The 1st one is straightforward: ['Budget'] => ['Target'].

Since the next four are dependent on an attribute from the month dimension, there are multiple ways to go about it.

Long way:
['Jan','Budget'] => ['Feb','Target'];
['Jan','New'] => ['Feb','Target'];
and so on...
Would have to do this for every month. So about 48 statements.

Short way:
Create an attribute in the month dimension for Next period. Then you can just have 4 statements.
['Budget'] => DB('test ceo',!Year,!Department,!Service Line,!Deliverable Type,!Customer,!CEOD_METRICS,'Target',Attrs('Month',!Month,'Next Period');
and so on...

The issue I see is that how are you handling for the year rollover; going from like Dec 2010 to Jan 2011.

Re: someone help me to write feeder for this

Posted: Fri May 13, 2011 5:52 am
by kid123
Thank you Ajian86.....I did the same and is working...for the year rolleover,for the year rollover we have to check whether current month is December and increment the year.....
but the feeder wont work,right?

Re: someone help me to write feeder for this

Posted: Fri May 13, 2011 5:56 am
by Steve Rowe
Welcome to the forum Kid123,

For the year roll around you write a seperate rule for Jan, just make sure it is before the general case rule in the rule sheet. ['Jan', ' Target]= etc
For the feeder write a seperate one for Dec ['Dec', 'Target'] =>
To reference year use the same principal as month, i.e Next and prior attributes.

HTH

Cheers,

Steve

Re: someone help me to write feeder for this

Posted: Fri May 13, 2011 1:24 pm
by kid123
Thank You Steve....


This is a great forum.....Cheers

Re: someone help me to write feeder for this

Posted: Fri May 13, 2011 4:50 pm
by Steve Rowe
Also to simplify your rule and feeder create a consolidation on your version dimension.

So Target Conso = Budget - New + Existing + Renewed

You can the write your rule as
['Target']=N:DB('test ceo',!Year,!Department,!Service Line,!Deliverable Type,!Customer,!CEOD_METRICS,'Budget',!month)
+(DB('test ceo',!Year,!Department,!Service Line,!Deliverable Type,!Customer,!CEOD_METRICS,'Target Conso',Attrs('Month',!Month,'Previous Period'));

and similar for your feeder.

The rule should evaluate faster since you are doing the summation in the version dimension, which is a much more efficient way of doing simple sums.

Cheers

Steve