Page 1 of 1

Cube Rules: reference element from Alias

Posted: Fri Apr 29, 2011 12:11 am
by BigG
Hi,

I have two different Timescale dimensions (one is a measure dimension with a timescale), both are months, one (Month Dim) has element name short desc Jul, Aug etc other (Measure DIm) has element name Jul Amount, Aug Amount etc. The Measure dim has an alias that matches Jul, Aug, etc

Both dimensions have 'Full year' rollup element name (Same element description)

I have a rule in a cube with the Measure Dim and a I feed the values from another cube with the Month Dim. I feed to the rollup 'Full Year'

..But, No Values appear, I have tested and the rule will work if I use same element naming convention in the Measure Dim (eg, Jul, Aug...). Is this the only solution or am I missing something with the Alias usage?

rule in Measure dim cube

Code: Select all

DB('BU_Salary_FTE, !Branch, !Employee, !MEASURE_DIM, !Year, !Budget_Version, '2203');
feeders from cube with Month

Code: Select all

['2203', 'Current']  => DB('BU_Recovery', !Year, '20CO', 'Current', 'Wages', !Employee, 'Full Year');

Re: Cube Rules: reference element from Alias

Posted: Fri Apr 29, 2011 1:57 am
by ajain86
what is the left side of the rule?

Re: Cube Rules: reference element from Alias

Posted: Fri Apr 29, 2011 2:03 am
by BigG
oh sorry, cut and paste

Code: Select all

['Wages', 'Current' ]   = N:

Re: Cube Rules: reference element from Alias

Posted: Fri Apr 29, 2011 2:09 am
by ajain86
Try:

['Wages', 'Current' ] = N: DB('BU_Salary_FTE, !Branch, !Employee, ATTRS('MEASURE_DIM',!MEASURE_DIM,Alias Name), !Year, !Budget_Version, '2203');

Replace Alias name with the name of your alias.

By default, the rule will look for the element name in the second dimension and not any alias. You will have to force it to look at the alias instead.

Re: Cube Rules: reference element from Alias

Posted: Fri Apr 29, 2011 2:40 am
by BigG
argh... to easy... thanks for quick response ajain86, tested and works.

Re: Cube Rules: reference element from Alias

Posted: Tue Jul 12, 2011 10:53 pm
by Delbrooks
If there are two or more aliases in your dimension, you will have to explicitly force aliases in your rules and feeders as shown by Ankur above.

Re: Cube Rules: reference element from Alias

Posted: Wed Jul 13, 2011 7:34 pm
by Steve Rowe
Is this "new" behaviour?
I've always avoided referring to alias in rules like the plague but I can't every recall hearing (or seeing it documented) that you need an explcit reference if you have multiple aliases.

Cheers,

Re: Cube Rules: reference element from Alias

Posted: Wed Jul 13, 2011 8:30 pm
by lotsaram
I agree. This is stock standard and nothing new. Using AttrS is standard practice to "bend" a rule or feeder when there is asymetry in a dimension between 2 cubes. It doesn't necessarily have to be an alias that is being referenced, it could just as easily be a standard text attribute or a string cell value from a cube. Also agree with Steve that alias references inside square brackets in rules is cardinal sin. This can lead to no end of problems when alias values change and the rules then fail.