How to Write the feeders for this special Rules

Post Reply
kiss351523
Posts: 51
Joined: Thu May 05, 2011 2:05 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2007 and 2003
Location: Asia

How to Write the feeders for this special Rules

Post by kiss351523 »

Dear All,

A question about Feeders, there is a Cube Names Cube1,
Dimension: Pro_Company, Sal_Company, Product, Year, Month, Account.

Elements
Pro_Company:
Total Company
Company A
Company B
Company C

Sal_Company:
Total Company
Company A
Company B
Company C
OutSale

Account: Amount
---------------------------------
The Rules in the Cube1 :

SKIPCHECK;

[‘Sal_Company’:’OutSale’] = N:DB ( ‘Cube1’, ’Total_Company’, !Pro_Company, !Product, !Year, !Month, !Account);

FEEDERS;

???How to write the feeder for this Rule?
——————————————————
Last edited by kiss351523 on Thu Jan 15, 2015 1:02 am, edited 1 time in total.
dan.kelleher
Community Contributor
Posts: 127
Joined: Wed Oct 14, 2009 7:46 am
OLAP Product: TM1
Version: 9.4
Excel Version: 11
Location: London

Re: How to Write the feeders for this special Rules

Post by dan.kelleher »

You don't necessarily need to write your rule using a DB function as it's not an inter-cube rule and you're not using any functions within the DB.

You can feed from a consolidation (i.e. Total_Company), which is the same as writing individual feeders for each of the node level children of the consolidation you're feeding from.

Have a read of this: http://www.ibm.com/developerworks/data/ ... ge620.html
How do FEEDERS work?
Unlike rules, feeders only ever apply to leaf level cells and never to consolidated cells. However, consolidated elements can be used in the specification of a feeder statement as a shorthand way of specifying all leaf elements within the consolidation. When specifying a consolidated element in a feeder statement the following occurs:
Feeding from a consolidation means all leaf descendants of the consolidation will feed if there is a value present. For example, if the consolidated element contained four leaf elements but only two of these contained a value, then only those two would feed.
Feeding to a consolidation means that all leaf cells under the consolidation will be fed. For example if the consolidated element contained four leaf elements then all four leaf elements would be fed.
This is an important principle as some people mistakenly believe that it is the consolidation that is doing the feeding or being fed. This can make debugging rules and feeders more difficult if this principle is not well understood.
When a feeder is applied it sets a single byte “flag” or “pseudo data” in a leaf cell to signal that it should be consolidated. This ensures that the sparse consolidation algorithm does not skip this cell when computing consolidated values. Once fed, a cell stays fed until either the server is restarted or the cube is unloaded.
In general, feeders are not required for C level rules. The only exception is when a rule is applied to a consolidated element where it does not have values in any of its child elements.
I am not going to write your feeder for you as then you won't learn anything, but the above provides all the information you need to do it yourself.
kiss351523
Posts: 51
Joined: Thu May 05, 2011 2:05 am
OLAP Product: TM1
Version: 9.5
Excel Version: 2007 and 2003
Location: Asia

Re: How to Write the feeders for this special Rules

Post by kiss351523 »

dan.kelleher wrote:You don't necessarily need to write your rule using a DB function as it's not an inter-cube rule and you're not using any functions within the DB.

You can feed from a consolidation (i.e. Total_Company), which is the same as writing individual feeders for each of the node level children of the consolidation you're feeding from.

Have a read of this: http://www.ibm.com/developerworks/data/ ... ge620.html
How do FEEDERS work?
Unlike rules, feeders only ever apply to leaf level cells and never to consolidated cells. However, consolidated elements can be used in the specification of a feeder statement as a shorthand way of specifying all leaf elements within the consolidation. When specifying a consolidated element in a feeder statement the following occurs:
Feeding from a consolidation means all leaf descendants of the consolidation will feed if there is a value present. For example, if the consolidated element contained four leaf elements but only two of these contained a value, then only those two would feed.
Feeding to a consolidation means that all leaf cells under the consolidation will be fed. For example if the consolidated element contained four leaf elements then all four leaf elements would be fed.
This is an important principle as some people mistakenly believe that it is the consolidation that is doing the feeding or being fed. This can make debugging rules and feeders more difficult if this principle is not well understood.
When a feeder is applied it sets a single byte “flag” or “pseudo data” in a leaf cell to signal that it should be consolidated. This ensures that the sparse consolidation algorithm does not skip this cell when computing consolidated values. Once fed, a cell stays fed until either the server is restarted or the cube is unloaded.
In general, feeders are not required for C level rules. The only exception is when a rule is applied to a consolidated element where it does not have values in any of its child elements.
I am not going to write your feeder for you as then you won't learn anything, but the above provides all the information you need to do it yourself.

Ths for your information, and could you tell me how to modify this Rule or how could I feed this Rule.
dan.kelleher
Community Contributor
Posts: 127
Joined: Wed Oct 14, 2009 7:46 am
OLAP Product: TM1
Version: 9.4
Excel Version: 11
Location: London

Re: How to Write the feeders for this special Rules

Post by dan.kelleher »

Did you read through the article? You should read it and make sure you understand it otherwise you're going to get stuck when trying to write rules with any kind of complexity. Your rule is a very simple one, something like:

SKIPCHECK;

[‘Sal_Company’:’OutSale’] = N: ['Pro_Company':'Total_Company’];

FEEDERS;

['Pro_Company':'Total_Company’] => [‘Sal_Company’:’OutSale’];
Post Reply