How to write feeders for this rule?

Post Reply
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

How to write feeders for this rule?

Post by macsir »

['Actual','Z'] =
IF ( (['X'] - ['Y']) >= 0, 2,
IF ( (['X'] - ['Y']) >= -0.05, 1, -1)
);

I am using this one to feed it but looks like cube is still not fed correctly. The result in cube is right by the way.
['Actual','X']=> ['Z'];

['Actual','X']=> ['Z'];
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
declanr
MVP
Posts: 1828
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: How to write feeders for this rule?

Post by declanr »

macsir wrote:['Actual','Z'] =
IF ( (['X'] - ['Y']) >= 0, 2,
IF ( (['X'] - ['Y']) >= -0.05, 1, -1)
);

I am using this one to feed it but looks like cube is still not fed correctly. The result in cube is right by the way.
['Actual','X']=> ['Z'];

['Actual','X']=> ['Z'];
I presume the above is a typo and you actually have 2 feeders:
['Actual','X']=>['Z'] and ['Actual','Y']=>['Z']

Your problem will be that if both X and Y are 0:
(0-0)=0 therefore ['Z'] = 2


So neither X or Y will feed Z in that scenario as they are 0. But Z needs to be fed as it has a value from the result, therefore looking at your rule Z will always have a value and therefore Z always needs to be fed.

You need to think of a way to ALWAYS feed Z. Up to you how you do it...
Declan Rodger
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: How to write feeders for this rule?

Post by macsir »

thanks for quick reply. your words make sense but how to always feed Z if it is not coming from X or Y. :cry:
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
Alan Kirk
Site Admin
Posts: 6647
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: How to write feeders for this rule?

Post by Alan Kirk »

macsir wrote:thanks for quick reply. your words make sense but how to always feed Z if it is not coming from X or Y. :cry:
Nobody can give you an exact answer without knowing a lot more about your rules and cubes, but there are (at least) two things to consider:
(a) If you feed from a consolidation, you're effectively feeding from all of its children. Yes, it can cause overfeeding but unless it's the type of overfeeding that blows your system out it can sometimes be a price worth paying. Or at least one that has to be paid. Your only problem then would be if every element in the consolidation was also zero.
(b) There may be another value in your model that is a key driver; that is, some kind of value where X, Y and Z make no sense unless that value is populated, even though none of them directly depend on it for calculation purposes. Although it's conventional to feed from one of the arguments that are used directly in the calculation of (in this case) Z, it's not "gun to the head mandatory". If Z only has a valid value when, say, R is populated, then feeding from R is certainly an option. (As would be feeding from "dummy" consolidations of R + X and R+ Y, which would bring us back to the principle above.)
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: How to write feeders for this rule?

Post by macsir »

Thanks for the hints, Alan. I would have a deep insight to my rules and will come back.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: How to write feeders for this rule?

Post by macsir »

Hi, All

Problem solved. Those unfed cells are the cells with X =0 and Y =0. So I skip those cells and only apply the rule to X <>0 or Y <> 0.
Thanks all. :D
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
User avatar
ioscat
Regular Participant
Posts: 209
Joined: Tue Jul 10, 2012 8:26 am
OLAP Product: Contributor
Version: 9.5.2 10.1.1 10.2
Excel Version: 07+10+13
Contact:

Re: How to write feeders for this rule?

Post by ioscat »

declanr wrote:
macsir wrote:['Actual','Z'] =
IF ( (['X'] - ['Y']) >= 0, 2,
IF ( (['X'] - ['Y']) >= -0.05, 1, -1)
);

I am using this one to feed it but looks like cube is still not fed correctly. The result in cube is right by the way.
['Actual','X']=> ['Z'];

['Actual','X']=> ['Z'];
I presume the above is a typo and you actually have 2 feeders:
['Actual','X']=>['Z'] and ['Actual','Y']=>['Z']

Your problem will be that if both X and Y are 0:
(0-0)=0 therefore ['Z'] = 2


So neither X or Y will feed Z in that scenario as they are 0. But Z needs to be fed as it has a value from the result, therefore looking at your rule Z will always have a value and therefore Z always needs to be fed.

You need to think of a way to ALWAYS feed Z. Up to you how you do it...
Need to add: if your zeroes are already fed somehow they still can feed forward. Fed (even unfed) zeroes can feed.
Post Reply