dbTalk Databases Forums  

MAX in a MDX

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


Discuss MAX in a MDX in the microsoft.public.sqlserver.olap forum.



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

Default MAX in a MDX - 03-31-2005 , 02:47 PM






I need to find MAX day (lowest level member) in Time dimension where a
particular metric in my Cube > 0
Here is what i have
I need to know if there is a better way to do this

with
member [measures].[systime] as '[measures].[inbound_system_time_Hours] +
[measures].[Adjusted_Outbound_System_Time]'
set [timeset] as '{
Tail(Filter (Descendants(Time.[All Time], [Time].[Day]),
[measures].[systime] > 0), 1) }'
select {[measures].[systime]} on columns,
{ [timeset] } on rows
from unifinal_web
where ([Function].[All Function].[01003])


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

Default Re: MAX in a MDX - 03-31-2005 , 05:17 PM






If your particular metric is a real measure instead of a calculated
measure...then you can do a NonEmptyCrossjoin between it and the
members of the Day...also using the Tail function to get the last. The
NonEmptyCrossjoin should be faster for those cases.


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.