dbTalk Databases Forums  

Name of Day

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


Discuss Name of Day in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bill Minton via SQLMonster.com
 
Posts: n/a

Default Name of Day - 04-18-2005 , 11:54 AM






I'm new to Analysis Services, and MDX. I've got a Date field (call it
MyDate) that is broken down into Year/Month/Day. I'd like to setup a
Calculated Member that shows the name of the day (Monday, Tuesday, etc.).
I'm really not sure how to do that.

I saw the thread at http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-
olap/5095/MDX-Time-Average which shows:

FILTER({[Time].[Day].MEMBERS}, [Time].CURRENTMEMBER.PROPERTIES("Day Full
Name") = "SUNDAY")

But I'm not sure if ".PROPERTIES("Day Full Name")" is a built-in MDX
function when dealing w/dates or not. Any suggestions regarding a good MDX
book for SQL programmers would be appreciated.

Thanks

--
Message posted via http://www.sqlmonster.com

Reply With Quote
  #2  
Old   
Michael Vardinghus
 
Posts: n/a

Default Re: Name of Day - 04-18-2005 , 02:51 PM






I've used the Accelerator for BI from Microsoft and here they suggest
putting this logic into the underlying SQL relational table

In fact they have a whole bunch of member properties on the different date
levelse (week number, day name as you mention) - and I actually managed to
expand it so i have information on number of holidays and so forth...

"Bill Minton via SQLMonster.com" <forum (AT) nospam (DOT) SQLMonster.com> wrote in
message news:3c03464a22894e1c9f11d7f332854d77 (AT) SQLMonster (DOT) com...
Quote:
I'm new to Analysis Services, and MDX. I've got a Date field (call it
MyDate) that is broken down into Year/Month/Day. I'd like to setup a
Calculated Member that shows the name of the day (Monday, Tuesday, etc.).
I'm really not sure how to do that.

I saw the thread at http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-
olap/5095/MDX-Time-Average which shows:

FILTER({[Time].[Day].MEMBERS}, [Time].CURRENTMEMBER.PROPERTIES("Day Full
Name") = "SUNDAY")

But I'm not sure if ".PROPERTIES("Day Full Name")" is a built-in MDX
function when dealing w/dates or not. Any suggestions regarding a good
MDX
book for SQL programmers would be appreciated.

Thanks

--
Message posted via http://www.sqlmonster.com



Reply With Quote
  #3  
Old   
Bill Minton via SQLMonster.com
 
Posts: n/a

Default Re: Name of Day - 04-18-2005 , 04:25 PM



I thought about that, but it just seems like I'm adding bloat to the cubes
at that point.

--
Message posted via http://www.sqlmonster.com

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

Default RE: Name of Day - 04-19-2005 , 08:36 AM



with
member [measures].[Day of Week] as 'vba!WeekDay( [DATE
DIMENSION].CurrentMember.Name)'
member [measures].[WeekDay Name] as 'Format([DATE
DIMENSION].CurrentMember.Name, "dddd")'
member [measures].[WeekDay Name Short] as 'Format([DATE
DIMENSION].CurrentMember.Name, "ddd")'

select NON EMPTY
{
[measures].[Day of Week]
, [measures].[WeekDay Name]
, [measures].[WeekDay Name Short]

} on columns,
{
[DATE DIMENSION].Members
} on rows
from [Your Cube]

"Bill Minton via SQLMonster.com" wrote:

Quote:
I'm new to Analysis Services, and MDX. I've got a Date field (call it
MyDate) that is broken down into Year/Month/Day. I'd like to setup a
Calculated Member that shows the name of the day (Monday, Tuesday, etc.).
I'm really not sure how to do that.

I saw the thread at http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-
olap/5095/MDX-Time-Average which shows:

FILTER({[Time].[Day].MEMBERS}, [Time].CURRENTMEMBER.PROPERTIES("Day Full
Name") = "SUNDAY")

But I'm not sure if ".PROPERTIES("Day Full Name")" is a built-in MDX
function when dealing w/dates or not. Any suggestions regarding a good MDX
book for SQL programmers would be appreciated.

Thanks

--
Message posted via http://www.sqlmonster.com


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.