比较MDX中的两个日期字段

时间:2015-10-09 21:41:52

标签: mdx date-comparison

我有像以下的SQL查询:

Select Count(*) 
from   [Response] 
where  ResponseEndDate < ValidDate

我如何在MDX中写下这个?

1 个答案:

答案 0 :(得分:0)

WITH MEMBER [Measures].cnt
AS 
([Employee].[Department Name].MEMBERS
,[Employee].[Start Date].&[2002-02-05T00:00:00]
:
 [Employee].[Start Date].&[2003-02-05T00:00:00]).COUNT

SELECT
  [Measures].cnt ON 0
FROM [Adventure Works]