Wednesday, November 24, 2010

Team Foundation Server 2010 MDX to exclude the weekends

 

WITH 
SET [WeekDays]
AS Filter(
[Date].[Date].[Date]
, COUNT(WTD([Date].[Year - Week - Date Hierarchy])) <> 1
AND COUNT(WTD([Date].[Year - Week - Date Hierarchy])) <> 7
)

SET [DateRangeFrom]
AS FILTER([WeekDays]
, [WeekDays].CurrentMember.Member_Value >= CDATE("11/17/2010")
)

SELECT {
[Measures].[Work Item Count],[Measures].[Revision Count]

}
ON COLUMNS,{
[DateRangeFrom]
// [Date].[Date].[Date]
// , WTD([Date].[Year - Week - Date Hierarchy].CurrentMember)
//
}

ON ROWS
FROM [Team System]

No comments:

Post a Comment