Page 1 of 1

No feed?

Posted: Fri Jan 08, 2010 10:42 am
by Gary16
I received some training in rules and feeders, but im struggling to fully understand the below feeder, the bit i dont understand is the "No feed" can anyone help
Thanks

Rule
['Price-Deluxe']=IF(ELPAR('Store',!Store,1)@='Gourmet Supermarket',['Sales']\['Units'],0);

Feeder
['Sales']=>DB(IF(ELPAR('Store',!Store,1)@='Gourmet Supermarket','Sales','No feed'),!Product,!Store,!Month,!Year,!Scenario,'Price-Deluxe');

Re: No feed?

Posted: Fri Jan 08, 2010 11:00 am
by Steve Rowe
Hi Gary,

This is known as conditionalising a feeder so that it only fires under certain conditions. In this case when the store is a child of 'Gourmet Supermarket'.

When the feeder is compiled it wither evaluates to

DB ('Sales', Dimrefs)

or

DB('No Feed', DimRefs)

Since (I hope) you don't have a cube called No Feed the feeder fails and no action is taken.
........................
Just a small comment on the rule, you will have a much more robust system if you use ElIsAnc rather than ElPar in the test. Since ElPar as an index you are relying on 'Gourmet Supermarket' always being first (the 1 at the end of the elpar) parent of a store. Most dimensions tend to end up with multiple hierarchies and there is no way to control if a particular structure is the first or the second. It can also change on a dimension save and not be consistent for all elements in a structure.

With ElIsAnc you are asking is the store a child of 'Gourmet Supermarket'
WIth ElPar you are asking is the first consolidation that store is a member of have 'Gourmet Supermarket' as it's immediate parent.

HTH.

Re: No feed?

Posted: Fri Jan 08, 2010 11:17 am
by Gary16
So you are saying the feeder works ok in the 1st stage Sales, and this provides a sufficient link for the rule to work ok.
So is the "no feed" their so the feeder is not repeated for units
Thanks

Re: No feed?

Posted: Fri Jan 08, 2010 11:30 am
by Steve Rowe
The no feed is there so the feeder only exectues for the children of Gourmet Supermarkets and not all stores in the store dimension.
Cheers

Re: No feed?

Posted: Fri Jan 08, 2010 12:23 pm
by Gary16
Thanks a lot i follow