dbTalk Databases Forums  

Problem MDX DateDiff with Product Dimension

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


Discuss Problem MDX DateDiff with Product Dimension in the microsoft.public.sqlserver.olap forum.



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

Default Problem MDX DateDiff with Product Dimension - 12-14-2006 , 03:29 PM






Hi,

I am trying to calculate the Number of Months a Product has been live
on our Web Site. For this I want to do a datediff between "Product Load
Date" and the last day of the last month of my "Year Month Day"
hierarchy.

My intial attempt is the following:

datediff("m", CDate([Products].[Product Load
Date].CurrentMember.MemberValue),Now())

which only works when you look at all dates. Another problem I have is
that the Dimension Attribute [Products].[Product Load Date] HAS TO be
part of View (as row or Column) but I would like not to show it at all.
I tried to use AVG() on it but it does not work.

Now, I would like to change it so instead of using NOW(), it uses the
Date Dim (Last Day of the Year if looking at it by, last day of Month
when looking at it by Month)

Please help.

Thanks,


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.