MDX Filter a dimention with another dimension

Posted by John Hartsock on Stack Overflow See other posts from Stack Overflow or by John Hartsock
Published on 2010-03-23T19:34:29Z Indexed on 2010/04/05 14:33 UTC
Read the original article Hit count: 347

To all excuse my ignorance, but im new to MDX below is the query im trying to run

 SELECT 
 NON EMPTY { [Measures].[Task Burn Down] } ON COLUMNS, 
 NON EMPTY { ([Calendar].[Date].[Date].ALLMEMBERS * [Priority].[Priority Code].[Priority Code].ALLMEMBERS ) } 
 DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS 
FROM ( 
 SELECT 
  ( { Filter([Calendar].[Date].AllMembers, [Calendar].[Date].CurrentMember <= [Sprint].[Sprint].CurrentMember.Properties("Stop Date")) } ) ON COLUMNS 
 FROM ( 
  SELECT 
   ( { [Sprint].[Sprint].AllMembers } ) ON COLUMNS 
  FROM ( 
   SELECT 
    ( { [Team].[Team].AllMembers } ) ON COLUMNS 
   FROM [Backlog2]
  )
 )
) 
WHERE ( [Team].[Team].&[27], [Sprint].[Sprint].&[9] ) 
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

When I run this I expect to get 1 value for [Measures].[Task Burn Down] for each day of the month. But I only want one month. My Sprint dimension has a stop date and I do not want to return any values after the stop date. What am I doing wrong?

© Stack Overflow or respective owner

Related posts about mdx

Related posts about sql-server-2005