Conditional Feeder Help

Post Reply
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Conditional Feeder Help

Post by PlanningDev »

We have a cube where data is pulled from another cube based on an attribute.

Something along the lines of

Code: Select all

['Expense'] = N: DB('Cube 2', 'Element 1', ATTRS( 'Dimension2, !Dimension2, 'Source Element Name'), 'Element 3');
It would seem that in this case we would need to write a conditional feeder in order to correctly feed the cube from the source.

Code: Select all

['Expense'] => DB( if(ATTRS( 'Dimension2, !Dimension2, 'Source Element Name')@=!SourceDim, 'Cube 1', ''), !Dim1, !Dim2, !Dim3);
No matter what we do we get an invalid string expression when trying to save the rule after adding the feeder. The only thing different about the cubes is the single dimension that we lookup the element name from the attribute.

Does this make sense? Im sure others have written rules that were dynamic to attributes? How do you feed this? Our thoughts at this point are to create a rollup in the target dimension that contains all the elements that lookup their value based on the attribute and just overfeed that subtotal.

Does the logical expression have to contain only elements from source cube? Our issue is that we have to lookup the source element from the attribute of the target dimension.

Any help?
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Conditional Feeder Help

Post by tomok »

How can we help you if you insist in showing useless pseudocode? It could be as simple as a syntax error but there's no way we would know that from the information you've provided.

In what cube do you have the feeder? Is it cube 2? If so, are all the dimensions you have with ! in front of them exist in that cube? Once again, so hard to help without the actual facts.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Re: Conditional Feeder Help

Post by PlanningDev »

Sorry for the pseudo code, In my attempts to simplify it down it has in turn become more confusing.

Here is the actual rule. This rule is part of the Consolidated Cube and it is reading data from the Capital Planning Cube. All dimensions match or are able to have a hard coded value except for the Consolidated Line and Capital Project dimension.

Code: Select all

#Region Capital Planning
['TM1 Cube','US']   = N:  if(ATTRS('ConsolidatedLine',!ConsolidatedLine,'CapitalPlanningLineName')@<>'',
DB('Capital Planning',ATTRS('ConsolidatedLine', !ConsolidatedLine, 'CapitalPlanningLineName'),'GAAP',!Month,!Version,!Year,'Expense')
, CONTINUE);
What we are trying to do is write the feeder for this rule.

Something like this

Code: Select all

['Expense'] => DB(IF(ATTRS('ConsolidatedLine', !ConsolidatedLine, 'CapitalPlanningLineName')@=!Capital Projects, 'ConsolidatedFinStmts', ''),'TM1 Cube','Forecast',!Month,!Year,'US',!ConsolidatedLine,'Amount');
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Conditional Feeder Help

Post by tomok »

Incomplete facts. What are the names of the dimensions in each cube and in what order do they appear. Have you ever read the request for assistance guidelines???
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Mems
Posts: 58
Joined: Thu Apr 14, 2011 12:27 pm
OLAP Product: TM1
Version: v10.2.2
Excel Version: 2010
Location: South Africa

Re: Conditional Feeder Help

Post by Mems »

Code: Select all

['Expense'] => 
DB(IF(ATTRS('ConsolidatedLine', !ConsolidatedLine, 'CapitalPlanningLineName')@=!Capital Projects, 'ConsolidatedFinStmts', ''),
'TM1 Cube',
'Forecast',!Month,!Year,'US',!ConsolidatedLine,'Amount');


!Capital Projects - is that a dimension in the cube?
Is 'TM1 Cube' an element or a cube? I am assuming it's an element or that should not be there, but I agree with tomok, post the real code and list of cubes/dimensions.
It's impossible to assist otherwise
MEMS
Post Reply