February 25, 2008 at 7:12 am
WITH MEMBER [Measures].[DateDiffInDays] AS
'datediff("d",[Dim Step Started Date].[Step Started Date].CurrentMember.Name,[Dim Step Ended Date].[Step Ended Date].CurrentMember.Name)'
SELECT NON EMPTY { [Measures].[DateDiffInDays], [Measures].[Fact Step Data Count] } ON COLUMNS,
NON EMPTY { ([Dim Step Started Date].[Step Started Date].[Step Started Date].ALLMEMBERS *
[Dim Step Ended Date].[Step Ended Date].[Step Ended Date].ALLMEMBERS ) }
DIMENSION PROPERTIES MEMBER_CAPTION ON ROWS FROM [cmCube]
Ok I have the above mdx query which returns the fol results when run in a sql window:
StartDate : EndDate : DateDiffInDays
01-08-2007 : 04-08-2007 : 3
These are the exact results I want
StartDate & EndDate are dimensions. How do I create DateDiffInDays in my SSAS project? When I went to my calculate tab, I created it as a script
but when I browse my cube, I'm not getting the same result as above.
February 29, 2008 at 9:20 pm
Do you get the same result when you filter the two dimensions down to individual dates (you had previously used 2007-08-01 and 2007-08-04)? I guess another pertinent question is what results *do* you get?
Steve.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply