Kenzo_Tenma February 2016

Using a feeder based on a condition in TM1

Can an element be fed based on an if condition?

The following is a rule calculation used for evaluating Validation values.

[{'AOP_v1','Forecast_v1'},'Validation', 'Rate'] = N:

IF(ROUNDP(['Phasing Total', 'Rate'] * 100, 5) = 100 % ROUNDP(['Phasing Total', 'Rate'] * 100, 5) = 0,   STET, 1);

Is there a way I can feed [{'AOP_v1','Forecast_v1'},'Validation', 'Rate'] with ['Phasing Total', 'Rate'] only when..

ROUNDP(['Phasing Total', 'Rate'] * 100, 5) = 100 % ROUNDP(['Phasing Total', 'Rate'] * 100, 5) = 0

?

Phasing Total Validation

Answers


Alan K February 2016

You can create conditional feeders by using a DB() function on the right hand side of the feeder. Rather than having the cube name hard coded in the DB formula you use an If() function which returns the name of the cube to be fed if the logical condition evaluates to True, or an empty string if it does not:

['FeedFrom']=>DB(IF(YourLogicalTest,'NameOfCube',''), !Dim1, !Dim2, 'Element');

Obviously this is just pseudo-code; the DB function may use various combinations of current element references (the ! operators) and hard coded element names. The key point is, though, that if the If() test returns an empty string then obviously the DB() function does not define anything to be fed.

I would recommend reading this IBM article on rules and feeders in general. This thread on TM1Forum contains some discussion on whether one should or should not use conditional feeders, or find another way.

Another factor that you need to take into account post-dates that thread; in newer versions of TM1 you can use multi-threaded loading to improve the load into memory time. However if you use conditional feeders you have to go back to a single threaded load. This may have a negligible impact on you, or it may be substantial.

Post Status

Asked in February 2016
Viewed 3,494 times
Voted 11
Answered 1 times

Search




Leave an answer