dbTalk Databases Forums  

MDX: Why doesn't level function defaults dimensions to CurrentMember?

microsoft.public.sqlserver.datawarehouse microsoft.public.sqlserver.datawarehouse


Discuss MDX: Why doesn't level function defaults dimensions to CurrentMember? in the microsoft.public.sqlserver.datawarehouse forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nico Jacobs
 
Posts: n/a

Default MDX: Why doesn't level function defaults dimensions to CurrentMember? - 03-17-2005 , 06:51 AM






When you build an MDX expression, we often want to make that expression
relative to the current cell in which this expression evaluates. This is
done by mapping the current cell on a member of a specific dimension (or
hierarchy, to be more precise) with the CurrentMember function. e.g. the
MDX expression

[Product].CurrentMember.PrevMember.Name

returns the name of the previous member of the current member of the
product dimension. If the system requires a member somewhere and you do
not specify a member but a dimension or hierarchy, the system
automatically uses CurrentMember as its default function. For instance,
in the above example, PrevMember can only be used on a member, but if we
apply it on a dimension, it automatically takes the current member of
that dimension, so we can rewrite the above expression as

[Product].PrevMember.Name

But if we repeat this exercise with the Level function (which returns
the level of a specific member, and thus requires a member to operate
on), we see that

[Product].CurrentMember.Level.Name

works fine, but the 'short notation'

[Product].Level.Name

does not work at all... The system complains:

Unable to update the calculated member.
Formula error - cannot bind: unknown member: "[Product]"

Anybody out there who has an explanation for this behaviour?

Nico

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.