Transfer data from attributes to cube with rules

Post Reply
User avatar
tm1starter
Posts: 9
Joined: Fri Jan 07, 2011 11:53 am
OLAP Product: Tm1
Version: 9.5.1
Excel Version: 2010

Transfer data from attributes to cube with rules

Post by tm1starter »

Hello all,

I have the next problem;

I have a employee cube with the next dims (simplified);
- Employee
- EmployeeType (elements I and E)
- Measure (element FTE)
- Period

and the Employee dim has the next attributes;
- FTE (Value between 0 and 1)
- EmployeeType (Value I or E)

With a rule I want to fill the cube with the FTE's out of the attribs in the Emloyee dim, the FTE's should be the same in all months, for example

Dimension.
employee FTE EmployeeType
Employee1 1 I


Cube

EmployeeType I
Measure FTE

Period
01 02 03 ...
Employee1 1 1 1 ...


With a TI proces it's quite simple to load the cube, but how is it done with a rule?

I come this far;

Code: Select all

['FTE' ] = DB('}ElementAttributes_Employee', !Employee, 'FTE');
But then the EmployeeType is not taken into account and on both I and E values are set.

I have tried this;

Code: Select all

['FTE' ] = If( DB('}ElementAttributes_Employee', !Employee, 'EmployeeType')=!EmployeeType,
					DB('}ElementAttributes_Employee', !Employee, 'FTE'),
					0); 
But this also doesn't work

Can someone help me :?:
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Re: Transfer data from attributes to cube with rules

Post by Steve Vincent »

is it only the I type of employee you wish to fill the value for FTE? If so, try;

Code: Select all

['FTE', 'I'] = DB('}ElementAttributes_Employee', !Employee, 'FTE');
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
User avatar
tm1starter
Posts: 9
Joined: Fri Jan 07, 2011 11:53 am
OLAP Product: Tm1
Version: 9.5.1
Excel Version: 2010

Re: Transfer data from attributes to cube with rules

Post by tm1starter »

It is not only the I type, I and E are used both.

I don not also want this one;

Code: Select all

['FTE', 'I'] = IF(DB('}ElementAttributes_Employee', !Employee, 'EmployeeType')='I'
                       DB('}ElementAttributes_Employee', !Employee, 'FTE'),
                       CONTINUE);
['FTE', 'E'] = IF(DB('}ElementAttributes_Employee', !Employee, 'EmployeeType')='E'
                       DB('}ElementAttributes_Employee', !Employee, 'FTE'),
                       CONTINUE);
I want a general rule, so when I'm adding types there is no problem
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: Transfer data from attributes to cube with rules

Post by tomok »

tm1starter wrote:I have tried this;
['FTE' ] = If( DB('}ElementAttributes_Employee', !Employee, 'EmployeeType')=!EmployeeType,
DB('}ElementAttributes_Employee', !Employee, 'FTE'),
0);
But this also doesn't work?
This should work but the problem is in your rule syntax. When comparing strings you use "@=". Change the above to:

['FTE' ] = If( DB('}ElementAttributes_Employee', !Employee, 'EmployeeType')@=!EmployeeType,
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
tm1starter
Posts: 9
Joined: Fri Jan 07, 2011 11:53 am
OLAP Product: Tm1
Version: 9.5.1
Excel Version: 2010

Re: Transfer data from attributes to cube with rules

Post by tm1starter »

Indeed this works, Thnx!

I'm a bit shamed, about this error :oops:
Post Reply