Hello,
I create a calculated member who gives me the difference between to date.
I use this MDX who works fine :
WITH MEMBER [Measures].[Delay] AS DateDiff("d",CDate([DateInit].[Date].CurrentMember.Properties("dateSQL")),CDate([Date].[Date].CurrentMember.Properties("dateSQL")))
SELECT
NON EMPTY {[Measures].[Delay]} ON COLUMNS,
NON EMPTY NonEmptyCrossJoin([Order].[Order].Members, NonEmptyCrossJoin({[Date].[2015].[mai 2015].[11/05/2015]}, [DateInit].[Date].Members)) ON ROWS
FROM [Sales]
But now I try to execute the same MDX without [DateInit] in my MDX ROWS and it doesn't work :
WITH MEMBER [Measures].[Delay] AS DateDiff("d",CDate([DateInit].[Date].CurrentMember.Properties("dateSQL")),CDate([Date].[Date].CurrentMember.Properties("dateSQL")))
SELECT NON EMPTY {[Measures].[Delay]} ON COLUMNS, NON EMPTY NonEmptyCrossJoin([Order].[Order].Members, {[Date].[2015].[mai 2015].[11/05/2015]}) ON ROWS FROM [Sales]
After quick search it's because in this case [DateInit].[Date].CurrentMember.Properties("dateSQL") return the value "All members".
Is anybody has an idea how to solve this problem
Thank you in advance
JB
I create a calculated member who gives me the difference between to date.
I use this MDX who works fine :
WITH MEMBER [Measures].[Delay] AS DateDiff("d",CDate([DateInit].[Date].CurrentMember.Properties("dateSQL")),CDate([Date].[Date].CurrentMember.Properties("dateSQL")))
SELECT
NON EMPTY {[Measures].[Delay]} ON COLUMNS,
NON EMPTY NonEmptyCrossJoin([Order].[Order].Members, NonEmptyCrossJoin({[Date].[2015].[mai 2015].[11/05/2015]}, [DateInit].[Date].Members)) ON ROWS
FROM [Sales]
But now I try to execute the same MDX without [DateInit] in my MDX ROWS and it doesn't work :
WITH MEMBER [Measures].[Delay] AS DateDiff("d",CDate([DateInit].[Date].CurrentMember.Properties("dateSQL")),CDate([Date].[Date].CurrentMember.Properties("dateSQL")))
SELECT NON EMPTY {[Measures].[Delay]} ON COLUMNS, NON EMPTY NonEmptyCrossJoin([Order].[Order].Members, {[Date].[2015].[mai 2015].[11/05/2015]}) ON ROWS FROM [Sales]
After quick search it's because in this case [DateInit].[Date].CurrentMember.Properties("dateSQL") return the value "All members".
Is anybody has an idea how to solve this problem
Thank you in advance
JB