Page 1 of 1

Rules to bring text attribute

Posted: Mon Jan 31, 2011 9:00 am
by mbillah
I have two cubes:

Cube A with dimensions Position, pay grade & Cube A Measures
Cube B has dimensions Position, Benefit Band & Cube B Measures.

If Pay grade has a text attribute like A, B, C, etc with the corresponding pay grade 1, 2, 3, etc, how I write a rule to bring those benefit bands in the Cube B against each pay grade? Only pay grade will be input against each position and I need to bring the matching benefit band from that attribute.

In cube B, I should be writing (pls complete);

[‘Benefit Band’]=


Thanking you in advance

Regards,
MB

Re: Rules to bring text attribute

Posted: Tue Feb 01, 2011 1:32 am
by cdredmond
MB,

Rules are among, if not THE, most complex tool available in the TM1 toolbox. In order to begin to understand how they work, I strongly recommend reading the Rules Guide cover to cover and following along with the examples in order to understand how they work. Here is a very short and basic description of the fundimentals of writing a rule:

[ Target ] = Source Statement ;

The [ ] (square brackets) indicate a short-hand cube reference where you do not need to include all dims in the cube, you do not need to use the proper dim order and you do not need to use the dim name unless you have duplicate element names between dims (e.g. "TOTAL" in Position and PayGrade dims).
The "Target" is then a simply a list of elements (e.g. [ 'Analyst', '1' ]). Yes, the target could actually be blank or empty like this: ([ ]). This indicates that the rule formula applies to the entire cube (all cells).
The "Source Statement" may also use short-hand notation as long as the source is in the same cube and is not conditional. Otherwise, you must use a DB formula, even if the source is the same cube.
As such, putting a dimension name alone into the target, will not work.
It is hard to judge exactly what rule you need with the limited info available. However, here are some requirements and things to consider:

It appears you will need to use string elements which means you will need to use these functions:
FEEDSTRINGS ; (in Cube A)
SKIPCHECK ;
FEEDERS ; (in Cube A)
You will need to use the string qualifier (S:) in the rule formula.
Consider design alternatives and the possibility of a complimentary inverse Attribute (i.e. Benefit Band as an attribute of PayGrade).