Can't Figure Out The Feeders

Post Reply
DNA_DC
Posts: 22
Joined: Wed Jul 01, 2009 3:53 pm
OLAP Product: TM1 and Cognos EP
Version: 9.4
Excel Version: 2003 and 2007

Can't Figure Out The Feeders

Post by DNA_DC »

Hey again everyone,

I seem to be getting a major headache from trying to figure this out and so I thought I'd reach out to the forum's resident brain trust.

I am trying to create a rule that will look at an attribute and use it as a reference for what value to use as a "target." I have posted the rule and the corresponding feeders below. However, I have a major issue. The value for the "target" shows up at all levels below level 2... and I can't figure out why.

All help would be appreciated.

Code: Select all

SKIPCHECK;

['Target'] = DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations, !Requirements Measures);

FEEDERS;

['Target COL'] =>DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations, 'Units');

['Target COL'] => DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations,  'Cost');
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Can't Figure Out The Feeders

Post by paulsimon »

Hi

I haven't looked at this in detail, but assuming that you only want the Target to appear at the base level, you just need to change your rule to add an N:

Code: Select all

['Target'] = N: DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations, !Requirements Measures);
DNA_DC wrote:Hey again everyone,

I seem to be getting a major headache from trying to figure this out and so I thought I'd reach out to the forum's resident brain trust.

I am trying to create a rule that will look at an attribute and use it as a reference for what value to use as a "target." I have posted the rule and the corresponding feeders below. However, I have a major issue. The value for the "target" shows up at all levels below level 2... and I can't figure out why.

All help would be appreciated.

Code: Select all

SKIPCHECK;

['Target'] = DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations, !Requirements Measures);

FEEDERS;

['Target COL'] =>DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations, 'Units');

['Target COL'] => DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations,  'Cost');
DNA_DC
Posts: 22
Joined: Wed Jul 01, 2009 3:53 pm
OLAP Product: TM1 and Cognos EP
Version: 9.4
Excel Version: 2003 and 2007

Re: Can't Figure Out The Feeders

Post by DNA_DC »

Well, I want this to be calculated at the base level but be aggregated at all of the levels above level > 0.
Alan Kirk
Site Admin
Posts: 6645
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: Can't Figure Out The Feeders

Post by Alan Kirk »

DNA_DC wrote:Well, I want this to be calculated at the base level but be aggregated at all of the levels above level > 0.
Yes, that's what should happen if you follow Paul's suggestion.

You'd be telling the rule that you want it to apply to the N level elements only. Any consolidations which add the N level values together will then ignore the rule and operate normally; they'll add the values of the N level elements just as if those values had been populated manually.

However you do have to make sure that you have a feeder pointing to ['Target'], otherwise you're likely to get inconsistent behaviour in the values being returned. (Particularly if you have zero suppression on.)
"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
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Can't Figure Out The Feeders

Post by paulsimon »

Assuming that

Code: Select all

ATTRS('Functions',!Functions,'Target') 
is gives you the Alias for Target, then you could change your Feeder to:

Code: Select all

['Target COL'] =>DB('Requirement', !Cycles, !Versions, !Stages, 'Target', !Fiscal Years, !Functions, !Installations, 'Units');
Regards

Paul Simon

DNA_DC wrote:Hey again everyone,

I seem to be getting a major headache from trying to figure this out and so I thought I'd reach out to the forum's resident brain trust.

I am trying to create a rule that will look at an attribute and use it as a reference for what value to use as a "target." I have posted the rule and the corresponding feeders below. However, I have a major issue. The value for the "target" shows up at all levels below level 2... and I can't figure out why.

All help would be appreciated.

Code: Select all

SKIPCHECK;

['Target'] = DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations, !Requirements Measures);

FEEDERS;

['Target COL'] =>DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations, 'Units');

['Target COL'] => DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations,  'Cost');
par3
Posts: 82
Joined: Tue Sep 09, 2008 7:05 am

Re: Can't Figure Out The Feeders

Post by par3 »

I agree,

Drop the ATTRS function in the feeder.
DNA_DC
Posts: 22
Joined: Wed Jul 01, 2009 3:53 pm
OLAP Product: TM1 and Cognos EP
Version: 9.4
Excel Version: 2003 and 2007

Re: Can't Figure Out The Feeders

Post by DNA_DC »

Well, its not an alias at all... rather an attribute that is actually the used to determine which "Target" to select (i.e. for this Function, the Target Band is X). I am using the Target Band as an attribute of the Function... There is one target band per function but many functions per band... and so I don't think aliases work.

I think I narrowed the problem to rule order... but now I am having an even bigger issue solving the problem:

Code: Select all

SKIPCHECK;

['Cost_hold' ] = N: ['Cost'] ;

['Cost_count' ] = N: IF(['Cost' ] <> 0, 1, 0);

['Cost' ] = C: ['Cost_hold' ] \ ['Cost_count' ];

['Target'] = N: DB('Requirement', !Cycles, !Versions, !Stages, ATTRS('Functions',!Functions,'Target'), !Fiscal Years, !Functions, !Installations, !Requirements);

['Total Amount'] = N: IF( ['Override'] > 0, ['Override'], ['Units'] * ['Cost']);

FEEDERS;


['Cost'] => ['Target'];

['Units'] => ['Target'];

['Override', 'Units', 'Cost'] => ['Total Amount'];



As its written above, the code works perfectly for all of the Measures except cost... it doesn't calculate it at any level above lvl 1...
Jeroen Eynikel
Community Contributor
Posts: 139
Joined: Mon Sep 15, 2008 1:45 pm

Re: Can't Figure Out The Feeders

Post by Jeroen Eynikel »

It would be helpful if you could post a screenshot showing cost at L0,L1 and L2. Please show a trace calculation/check feeders log as well of the cells. It seems very weird to me that it would calculate correctly at L0 and L1 but not at L2. I kindof suspect it is not calculating properly at L1 either.

Please restart your server first and then check again. Feeders do not get reset untill you restart the dbase.

I.e.

If I write a rule like this

skipcheck;

['value']=['price']*['quantity'];

feeders;

['quantity'] => ['value'];


and then remove the feeder everything will appear to work ok as long as no new data is added or the service is restarted. As soon as you restart the service the lack of feeders will become apparent though.
Post Reply