dbTalk Databases Forums  

Creating a Dimension Member based on Named Set

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


Discuss Creating a Dimension Member based on Named Set in the microsoft.public.sqlserver.olap forum.



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

Default Creating a Dimension Member based on Named Set - 04-05-2004 , 07:28 PM






Hi,

I have a cube in SQL Server 2000 Analysis Services with 'Time of Day'
dimension with Levels as
Hour of Day
15 Min interval
5 Min Interval

In my MDX, I need to display analysis for Morning, Afternoon and
Evening hours. Lets assume
Morning is from 8.00 a.m to 10.00 a.m
Afternoon is from 12.00 to 3.00 p.m
Evening is from 8.00 to 11.00 p.m.

Here is the MDX

with
SET [SelectedSalesDept] AS '{ [Sales Department].[standard].children
}'
SET [Morning] AS '{ [Time of Day].[Standard].[08a-09a]:[Time of
Day].[Standard].[09a-10a]}'
SELECT {[SelectedSalesDept]} on columns, {[Morning] } on rows FROM
[Sales]
where [Measures].[Sales Transactions]

It shows two members in the set on the rows correctly. What I need
instead is to display the name of the set 'Morning' as single row with
values aggregated for the members in the Set.

It would be really nice if someone can direct me in the right
direction.

Thanks,

Vinayak

Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Creating a Dimension Member based on Named Set - 04-05-2004 , 08:43 PM






Is this what you are looking for?

Quote:
with
SET [SelectedSalesDept] AS
'{[Sales Department].[standard].children}'
SET [Morning] AS
'{[Time of Day].[Standard].[08a-09a]
:[Time of Day].[Standard].[09a-10a]}'
Member [Time of Day].[Morning] as
'Aggregate([Morning])'

SELECT [SelectedSalesDept] on columns,
{[Time of Day].[Morning]} on rows
FROM [Sales]
Quote:

- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Reply With Quote
  #3  
Old   
Vinayak
 
Posts: n/a

Default Re: Creating a Dimension Member based on Named Set - 04-06-2004 , 08:54 AM



Hi Deepak,

Thanks for the reply. That was exactly what I was looking for.

Vinayak

Deepak Puri <deepak_puri (AT) progressive (DOT) com> wrote

Quote:
Is this what you are looking for?


with
SET [SelectedSalesDept] AS
'{[Sales Department].[standard].children}'
SET [Morning] AS
'{[Time of Day].[Standard].[08a-09a]
:[Time of Day].[Standard].[09a-10a]}'
Member [Time of Day].[Morning] as
'Aggregate([Morning])'

SELECT [SelectedSalesDept] on columns,
{[Time of Day].[Morning]} on rows
FROM [Sales]



- Deepak

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

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.