dbTalk Databases Forums  

Median Expression not working properly

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


Discuss Median Expression not working properly in the microsoft.public.sqlserver.olap forum.



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

Default Median Expression not working properly - 01-05-2005 , 01:37 PM






Hi,

I'm trying to get a median cycle time in my cube. I have used the following
expression in MDX as a start and so far it only works on the lowest level of
my employee dimension.

Median (
{ Descendants (
[CodingTime].CurrentMember,
[CodingTime].[Week]
) },
[Measures].[CycleTime]

I only have a time dimension and an employee dimension. I would like to
have the median roll up into the highest level possible (All Time & All
Employees) I have tried everything I can think of at this point. Can
someone please help me?

Thanks.



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

Default Re: Median Expression not working properly - 01-06-2005 , 12:09 PM






Assuming that you consider each populated leaf-level combination of your
[Employee] and [CodingTime] dimensions as a [CycleTime] sample:

Quote:
Median(NonEmptyCrossJoin(
Descendants([CodingTime].CurrentMember,,LEAVES),
Descendants([Employee].CurrentMember,,LEAVES)),
[Measures].[CycleTime])
Quote:

- Deepak

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


Reply With Quote
  #3  
Old   
kaplan.jason@gmail.com
 
Posts: n/a

Default Re: Median Expression not working properly - 01-10-2005 , 04:14 PM



Thanks Deepak!

Deepak Puri wrote:
Quote:
Assuming that you consider each populated leaf-level combination of
your
[Employee] and [CodingTime] dimensions as a [CycleTime] sample:


Median(NonEmptyCrossJoin(
Descendants([CodingTime].CurrentMember,,LEAVES),
Descendants([Employee].CurrentMember,,LEAVES)),
[Measures].[CycleTime])



- 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.