dbTalk Databases Forums  

Weird behaviour related to MDX

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


Discuss Weird behaviour related to MDX in the microsoft.public.sqlserver.olap forum.



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

Default Weird behaviour related to MDX - 07-17-2006 , 11:25 AM






Hi All,

I’m experiencing some unusual behavior with an AS 2005 cube. A calculated
measure behaves differently when time dimension drilled down from selecting
individual days/weeks. To be more precise, if I drill down the time
dimension to the daily level, my calculated measure is displayed; however, if
I select a particular day or a week, I get null values. Below is the script
that I am using. Any suggestions would be greatly appreciated!



CREATE MEMBER CURRENTCUBE.[MEASURES].[Unit Goal]
AS
CASE WHEN [Time].[Time].CURRENTMEMBER.LEVEL.ORDINAL = 5
THEN
CASE WHEN [Time].[Time].currentmember.properties("BUS")="Y"
THEN ([Measures].[Units
Goal],[Time].[Time].currentmember.parent.parent) /[MEASURES].Bus_Days
ELSE NULL
END
when [Time].[Time].CURRENTMEMBER.LEVEL.ORDINAL = 4
THEN SUM(Descendants([Time].[Time].CurrentMember,
[Time].[Time].[Date]) , [Unit Goal])
ELSE [Measures].[Units Goal]
END,
FORMAT_STRING = "#,#";

Thanks,
Paul

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.