Page 1 of 1

ATTRS question

Posted: Tue May 05, 2009 2:44 pm
by BigDSter
Okay I may be overlooking the blinding obvious but for some reason I can't get this to work.

I have a standard cube which is in Periods. The users want it in weeks, which is fine, but the pricing for a valuation routine is stored in a period cube maintained by the user.

I've put the weeks into the same dimension but have added an attribute to them that indicates which period they belong too, for Pricing purposes.

In my valuation routine I have Cases as my source view, and my new value as

nvalue=value*CellGetN(
'NFF Pricing',customer,product,yyear,ATTRS('NFF Period', week, 'Period'))
;

where customer/product/yyear/week are defined as elements on the variables tab.

It comes up with the error

Line 1: Invalid key: ""

which vanishes when I change week to 'w_1'

Can I not use ATTRS this way?

Hope someone can point out what stupid mistake I am making this time :lol:

Re: ATTRS question

Posted: Tue May 05, 2009 3:16 pm
by John Hobson
How is "week" defined David?

best wishes

John

Re: ATTRS question

Posted: Tue May 05, 2009 3:19 pm
by Steve Vincent
I'm assuming this is a TI, so could it be the 1st record the TI is based on is picking an element in "NFF period" that has no week attribute defined?

Re: ATTRS question

Posted: Tue May 05, 2009 4:06 pm
by BigDSter
Steve Vincent wrote:I'm assuming this is a TI, so could it be the 1st record the TI is based on is picking an element in "NFF period" that has no week attribute defined?
doh :oops:

That will be the one then ;)

Ta

Re: ATTRS question

Posted: Tue May 05, 2009 4:29 pm
by Steve Vincent
Only thought of it because its caught me out on a number of occasions ;) Mistakes are worth making as long as a) they don't kill you and b) you learn from them :lol: