![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All The below query hangs, however if I remove the ([YearMonthDay].[Range]) in the where clause it atleast executes but doesn't hang. Hangs ______ 'WITH Member [ReferenceClassA].[tot] AS ''SUM(Filter({ Descendants ([ReferenceClassA].[All ReferenceClassA], [ReferenceClassA].[All ReferenceClassA].Level, after)}, ([ReferenceClassA].CurrentMember.Properties("Desc") "Ignored"))))'' SET [Day Range] AS ''{[YearMonthDay].[Actual Date].[01/01/2004] :[YearMonthDay].[Actual Date].[12/31/2004]}'' MEMBER [YearMonthDay].[Range] AS ''AGGREGATE([Day Range])'' SELECT {[MONTH].[Month Short Name].MEMBERS} ON ROWS, {[ReferenceClassA].[tot]} ON COLUMNS FROM [ACube] WHERE ([YearMonthDay].[Range])' Doesn't hang and returns results _________________________________ 'WITH Member [ReferenceClassA].[tot] AS ''SUM(Filter({ Descendants ([ReferenceClassA].[All ReferenceClassA], [ReferenceClassA].[All ReferenceClassA].Level, after)}, ([ReferenceClassA].CurrentMember.Properties("Desc") "Ignored"))))'' SELECT {[MONTH].[Month Short Name].MEMBERS} ON ROWS, {[ReferenceClassA].[tot]} ON COLUMNS FROM [ACube]' Can anybody please help me out in figuring out why the date range slicer hangs. thanks in advance Milind |
#3
| |||
| |||
|
| *The initial time range expressed in months*/ |
#4
| |||
| |||
|
|
Hi Chris, Here's an alternative formulation that doesn't refer to the individual time dimension levels explicitly, so it should work with various hierachies. An assumption here is that 'MYRANGE' is at the leaf level of the time hierarchy: *The initial time range expressed in months*/ SET MYRANGE AS '{[Time].[1997].[Q1].[3] :[Time].[1998].[Q3].[7]}' /*Test whether Time member is a subset of range */ Member [Measures].[InRange] as 'Except(Descendants([Time].CurrentMember,, LEAVES), MYRANGE).Count = 0' /* Include all members in range whose parents are not in range */ SET MYNEWRANGE AS 'Filter([Time].Members, [Measures].[InRange] AND Not ( [Measures].[InRange], [Time].Parent))' /*Helper calculated members to display the steps*/ MEMBER MEASURES.STEP1 AS 'SETTOSTR(MYRANGE)' MEMBER MEASURES.STEP5 AS 'SETTOSTR(MYNEWRANGE)' /*Show working*/ SELECT {MEASURES.STEP1, MEASURES.STEP5} ON 0 FROM SALES Is there a way that this (common) pattern could be recognized/optimized by the MDX query engine? - Deepak *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
![]() |
| Thread Tools | |
| Display Modes | |
| |