dbTalk Databases Forums  

MDX Column missing

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


Discuss MDX Column missing in the microsoft.public.sqlserver.olap forum.



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

Default MDX Column missing - 08-08-2005 , 11:40 AM






Hi

I have a call center fact table which has half an hour granularity.

If I run the below MDX in the MDX Sample App

WITH MEMBER [Time].[07:00 to 08.00 AM] AS
'[Time].[07:00-07:29]+[Time].[07:30-07:59]'
SELECT {[Time].[07:00 to 08.00 AM]} ON ROWS,
{[Measures].[Calls]} ON COLUMNS
FROM [HVDNCube]

I get the following output

Calls
07:00 to 08.00 AM 12

But if I run the same query (with openquery) in SQL Query analyzer

SELECT * FROM OPENQUERY(OHPSRV01MMSIDataMart, 'WITH MEMBER
[Measures].[Calls] AS ''([Measures].[AcdCalls] +
[Measures].[Connectcalls] + [Measures].[Outflowcalls])''
MEMBER [Time].[07:00 to 08.00 AM] AS
''[Time].[07:00-07:29]+[Time].[07:30-07:59]''
SELECT {[Time].[07:00 to 08.00 AM]} ON ROWS,
{[Measures].[Calls]} ON COLUMNS
FROM [HVDNCube]')

I get the following output

[Measures].[Calls]
12

I dont get the column which has values 07:00 to 08.00 AM.

Please help!!!!

Thanks in advance

Milind


Reply With Quote
  #2  
Old   
Milind
 
Posts: n/a

Default Re: MDX Column missing - 08-08-2005 , 02:43 PM






Ok figured this out.

The calculated member needs to be child of the [All Time].

SELECT * FROM OPENQUERY(OHPSRV01MMSIDataMart*, 'WITH MEMBER
[Measures].[Calls] AS ''([Measures].[AcdCalls] +
[Measures].[Connectcalls] + [Measures].[Outflowcalls])''
MEMBER [Time].[All Time].[07:00 to 08.00 AM] AS
''[Time].[07:00-07:29]+[Time].*[07:30-07:59]''
SELECT {[Time].[07:00 to 08.00 AM]} ON ROWS,
{[Measures].[Calls]} ON COLUMNS
FROM [HVDNCube]')

Hope this helps for someone in the future.

thanks

Milind


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.