External Cube Reference issue

Post Reply
l_stoker
Posts: 8
Joined: Thu Oct 14, 2010 3:22 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

External Cube Reference issue

Post by l_stoker »

Good Morning,

I'm sure i'm overlooking something here, so forgive me if it is obvious, but the more i look at this the more annoyed i get and less clear are my thoughts.

I have a budget cube with a year dimension which i want to pull into an actuals cube that has a month dimension with quarter and year consolidations.

['Budget','Hours']=N:
DB('Project Budgets', !Project,!ProjectTask, !ProjectExpType, '2013', DB('}ElementAttributes_Project',!Project,'EWOVersion') ,'Budget','Hours');

If i use the above, the rule returns the budget values correctly. However hard coding a year is not ideal, so i want to replace 2013 with

DB('ProjectPhasing',!ProjectPeriod,'Yearlookup')

but when i do this no values are returned.

If i write the following rule in another cell, just to see what is returned, then i get 2013

['Budget','6026','JAN-13','Costs']=DB('ProjectPhasing',!ProjectPeriod,'Yearlookup');

Any ideas why this won't work?? Is there a data mismatch or am i missing something fundamental?

Many thanks
Lee
User avatar
Steve Rowe
Site Admin
Posts: 2417
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: External Cube Reference issue

Post by Steve Rowe »

Is the cell you are storing your year in a string? If not then change it to a string or apply the str formula to your DB ref.

HTH
Cheers
Technical Director
www.infocat.co.uk
l_stoker
Posts: 8
Joined: Thu Oct 14, 2010 3:22 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010

Re: External Cube Reference issue

Post by l_stoker »

Legend!! Appreciate your guidance on this.
Lee
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: External Cube Reference issue

Post by Duncan P »

Normally if you use a string in a numerical context, or a number in a string context (such as here) the rule compiler gives an error. However because DB can return either strings or numbers, according to what its inputs are, the compiler has no way of telling that you have made a mistake. What happens at runtime is that if the context is numeric and the source is a string it returns 0 and if the context is string and the source is numeric it returns the empty string.
Post Reply