Help with a feeder

Post Reply
Paul-TM1
Posts: 124
Joined: Tue Jun 13, 2017 3:20 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Help with a feeder

Post by Paul-TM1 »

Hi All,
I have a rule and having a hard time writng a feeder. Can someone please help? The rule works but on zero suppress, it disappears.

Rule

Code: Select all

['Cost']=N: If (  ATTRS('Versions', !Versions, 'LiveVersion') @= 'Y' &	
	!Accounts @= DB('LaborGroupType', ATTRS('Projects', !Projects, 'PAG')	,	ATTRS('Employees', !Employees, 'LAB_GRP_TYPE') ,'Hours','R','Value') &	
	!Orgs @= ATTRS('Employees', !Employees, 'ORG_ID')	,	
	DB('Labor',!Projects,!Employees,!Months,!Versions,'Planned Cost')		
	+	
	DB('Labor',!Projects,!Employees,!Months,!Versions,'Planned Cost - Overtime'), stet );
Feeder that I have written and not working:

Code: Select all

['Planned Cost'] =>DB( If( ATTRS('Versions', !Versions, 'LiveVersion') @= 'Y',  'SumProjLaborByAccts','') ,!Projects,!Employees, 
	DB('LaborGroupType', ATTRS('Projects', !Projects, 'PAG'),	ATTRS('Employees', !Employees, 'LAB_GRP_TYPE') ,'Hours','R','Value')
 , ATTRS('Employees', !Employees, 'ORG_ID') ,!Months,!Versions,'Cost');

['Planned Cost - Overtime']  =>DB( If( ATTRS('Versions', !Versions, 'LiveVersion') @= 'Y',  'SumProjLaborByAccts',''),!Projects,!Employees, 
	DB('LaborGroupType', ATTRS('Projects', !Projects, 'PAG'),	ATTRS('Employees', !Employees, 'LAB_GRP_TYPE') ,'Hours','R','Value')
 , ATTRS('Employees', !Employees, 'ORG_ID') ,!Months,!Versions,'Cost');
Thanks,
Paul.
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Help with a feeder

Post by Wim Gielis »

Hello Paul,

First, I would create a new measure as the total of 'Planned Cost' and 'Planned Cost - Overtime'.
Reference that new total in the rule (that will be marginally quicker) and in the feeders (you can reduce 2 feeder statements to 1, hence less maintenance and if in the future the total has a 3rd child, no changes to rules nor feeders are needed).

As to the feeders: we need to see the cube names and the dimensions in a TM1 client, to spot typo's or similar errors.
Usually, I replace functions by hardcoded values until the error is gone, then work backwards and add the functions in - testing each step as you progress.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Paul-TM1
Posts: 124
Joined: Tue Jun 13, 2017 3:20 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: Help with a feeder

Post by Paul-TM1 »

Hi Wim,
Thanks for the advice and I will certainly use it. On further analysis, I found the feeder was from a different cube. I will create a new one rather than use the same thread.

Thanks,
Paul.
Post Reply