Cube Rules: reference element from Alias

Post Reply
BigG
Community Contributor
Posts: 211
Joined: Tue Sep 15, 2009 11:13 pm
OLAP Product: IBMPA
Version: PA 2.0 Cloud
Excel Version: 2010

Cube Rules: reference element from Alias

Post 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');
GG
ajain86
Community Contributor
Posts: 132
Joined: Thu Oct 15, 2009 7:45 pm
OLAP Product: TM1
Version: 9.4.1 9.5 9.5.1
Excel Version: 2003 2007

Re: Cube Rules: reference element from Alias

Post by ajain86 »

what is the left side of the rule?
Ankur Jain
BigG
Community Contributor
Posts: 211
Joined: Tue Sep 15, 2009 11:13 pm
OLAP Product: IBMPA
Version: PA 2.0 Cloud
Excel Version: 2010

Re: Cube Rules: reference element from Alias

Post by BigG »

oh sorry, cut and paste

Code: Select all

['Wages', 'Current' ]   = N:
GG
ajain86
Community Contributor
Posts: 132
Joined: Thu Oct 15, 2009 7:45 pm
OLAP Product: TM1
Version: 9.4.1 9.5 9.5.1
Excel Version: 2003 2007

Re: Cube Rules: reference element from Alias

Post 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.
Ankur Jain
BigG
Community Contributor
Posts: 211
Joined: Tue Sep 15, 2009 11:13 pm
OLAP Product: IBMPA
Version: PA 2.0 Cloud
Excel Version: 2010

Re: Cube Rules: reference element from Alias

Post by BigG »

argh... to easy... thanks for quick response ajain86, tested and works.
GG
Delbrooks
Posts: 3
Joined: Sun Mar 06, 2011 6:22 pm
OLAP Product: TM1
Version: 9.0
Excel Version: 2003

Re: Cube Rules: reference element from Alias

Post 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.
User avatar
Steve Rowe
Site Admin
Posts: 2456
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: Cube Rules: reference element from Alias

Post 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,
Technical Director
www.infocat.co.uk
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Cube Rules: reference element from Alias

Post 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.
Post Reply