I have a conceptual doubt with TM1 Rule Calculation for C Level elements. I need the rules to aply only for specific C level elements in time dimension (month) but All attributes that i have to evaluate are defined for a N level element (!Concesion). I Know C level Rules only apply for C level elements but i was expecting that making sure one element (month in this case) is C level the rule will work fine but as a result i have some attributes evaluations ignored.
In the following rule only ATTRN evaluation for periodicity is working good, the others are ignored:
It has any sense with my logic or is completely wrong according to the concept?[ 'Capital', 'Real' ] =C:
IF (
# With the following 3 lines i am trying to ensure the element for time dimension correspond to the C level element that i need:
( DType ( 'Month', !Month ) @= 'C' )
& ( ElIsAnc ( 'Month', 'QTD', !Month ) = 1)
& ( Ellev ( 'Month', !Month ) = 1)
# With the folowing 4 lines i am evaluating the attributes values that have sense for the rule where " !Concesion " is a N Level element:
& ( AttrS ('Concesion' , !Concesion , 'Moneda Base Contrato' ) @= !Moneda )
& ( AttrS ('Concesion' , !Concesion , 'Terminal' ) @= !Terminal )
& ( AttrS ('Concesion' , !Concesion , 'Tipo Concesion' ) @= 'Municipio' )
& ( AttrN ('Concesion' , !Concesion , 'Periodicity' ) = 3 )
# calculations:
, AttrN ('Concesion' , !Concesion , 'Value' )
- DB( 'C.Concesion',!Terminal,!Concesion ,!Version , !Month , !Moneda ,'Interest')
, Continue
) ;
If it is wrong, may you please suggest something else?
many thanks!