Get n Level First Parent's Rule Statement
Posted: Tue Aug 26, 2014 6:59 pm
I use TM1 10.1. I am testing to write a rule to copy first parents of n level elements' Monthly Wages to a summary cube without the need of creating an intermediate calculation cube. It is from our staff planning's employee Info cube.
to our Ops Plan Cube
If I hardcoded the first 0 level element (EIN - 023011) of "200010-010 Organic Prep" dept in the rule, below rule works
['Base Wages', 'Jan']=N:DB('Employee Info', ELPAR('Employee', 'EIN - 023011', 1), 'Budget','JanWage');
But I need to replace 'EIN - 023011' for all n level elements of "Employee" dim, below rule does not work (I got string expression error message)
['Base Wages', 'Jan']=N:DB('Employee Info', ELPAR('Employee', IF( EllEV('Employee', !Employee)=0, !Employee, STET), 1), 'Budget','JanWage');
If element level is not zero level, I do not want to have its first parents, bypass it. Please help, thank you
to our Ops Plan Cube
If I hardcoded the first 0 level element (EIN - 023011) of "200010-010 Organic Prep" dept in the rule, below rule works
['Base Wages', 'Jan']=N:DB('Employee Info', ELPAR('Employee', 'EIN - 023011', 1), 'Budget','JanWage');
But I need to replace 'EIN - 023011' for all n level elements of "Employee" dim, below rule does not work (I got string expression error message)
['Base Wages', 'Jan']=N:DB('Employee Info', ELPAR('Employee', IF( EllEV('Employee', !Employee)=0, !Employee, STET), 1), 'Budget','JanWage');
If element level is not zero level, I do not want to have its first parents, bypass it. Please help, thank you