I want to write the following T SQL query in MDX 

```
Select count(bugs),priority from table 
where
Case when priority =1 then startdate< dateadd(dd,-7,getdate())
     when priority =2 then startdate< dateadd(dd,-14,getdate())
end
group by priority

```

Tried the following but not working

```
WITH MEMBER [Measures].CHECKING 
AS 
CASE [Item].[ startdate].CurrentMember 
WHEN [Item].[ Priority].&[1] THEN [Item].[startdate]<DATEADD(DAY,-7,NOW())
WHEN [Item].[ Priority].&[2] THEN [Item].[startdate]<DATEADD(DAY,-14,NOW())
END

SELECT
NON EMPTY{[Measures].[Count], [Measures].CHECKING }ON COLUMNS
,NON EMPTY{([Item].[ Priority].[ Priority].ALLMEMBERS )}

```

I am new to MDX queries, any suggestions on how to approach this please..