dbTalk Databases Forums  

Default Memeber

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Default Memeber in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike Morse
 
Posts: n/a

Default Default Memeber - 11-17-2003 , 03:54 PM






How would I specify the default memeber of my Date dim to
be todays year. I have seen examples uysing last sibling
however my date dim goes well into 2005/6. I'm trying to
specify the current year.

Anyone solved this one yet.
TIA.
-mike

Reply With Quote
  #2  
Old   
Irina Gorbach [MS]
 
Posts: n/a

Default Re: Default Memeber - 11-17-2003 , 10:37 PM






Helo Mike,
try to specify something like this(I'm not sure about the syntax, please
check it before using)

StrToMember(CStr(Year(Now)))


--
Hope this helps,
Irina

---------------------------
Disclaimer: This posting is provided 'AS IS' with no
warranties, and confers
no rights.

"Mike Morse" <mike.morse (AT) micromo (DOT) com> wrote

Quote:
How would I specify the default memeber of my Date dim to
be todays year. I have seen examples uysing last sibling
however my date dim goes well into 2005/6. I'm trying to
specify the current year.

Anyone solved this one yet.
TIA.
-mike



Reply With Quote
  #3  
Old   
Michael Shao [MSFT]
 
Posts: n/a

Default RE: Default Memeber - 11-18-2003 , 06:24 AM



Hi Mike,

Thanks for your post. In the FoodMart 2000 sample database, please try to
use the following MDX statements in the Default member property of the Time
dimension to specify the default member.

Strtomember("[Time].&[" + CStr(year(Date()))+"]")

For more information regarding this issue, please refer to the following
articles on SQL Server Books Online.
Topic: "Set Default Member Dialog Box"
Topic: "StrToMember"

Please feel free to post in the group if this solves your problem or if you
would like further assistance.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


Reply With Quote
  #4  
Old   
mike.morse
 
Posts: n/a

Default RE: Default Memeber - 11-18-2003 , 07:18 AM



Thank you
I was unaware of the function StrToMember. Works
perfectly.

-mike

Quote:
-----Original Message-----
Hi Mike,

Thanks for your post. In the FoodMart 2000 sample
database, please try to
use the following MDX statements in the Default member
property of the Time
dimension to specify the default member.

Strtomember("[Time].&[" + CStr(year(Date()))+"]")

For more information regarding this issue, please refer
to the following
articles on SQL Server Books Online.
Topic: "Set Default Member Dialog Box"
Topic: "StrToMember"

Please feel free to post in the group if this solves your
problem or if you
would like further assistance.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and
confers no rights.

.


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 - 2012, Jelsoft Enterprises Ltd.