views:

187

answers:

1

I would like to modify the Team Foundation Server built-in MS Agile template reports to exclude weekends.

For example, here is the dsWorkItemHistory dataset for the Remaining Work report:

WITH
MEMBER [Measures].[Date Key] AS
    [Date].[Date].CurrentMember.UniqueName

SELECT
  {
    [Measures].[Date Key],
    [Measures].[Cumulative Count]
  } ON COLUMNS,
  (
    [Work Item].[System_State].[System_State],
    (StrToMember(@StartDateParam):StrToMember(@EndDateParam))
  )
  ON ROWS
FROM [Team System]
WHERE
(
  STRTOMEMBER("[Team Project].[Team Project].["+@Project+"]"),
  STRTOSET(@IterationParam),
  STRTOSET(@AreaParam),
  STRTOSET(@WorkItemTypeParam)
)

I am totally unfamiliar with MDX. Any pointers toward customizing the data returned to exclude weekends is appreciated.

A: 

Use the datepart function with the dw part to exclude saturday and sunday.

SYNTAX: DATEPART ( datepart , date )

in this case datepart = dw or weekday and date is the date field in your query

Zaid Zawaideh
Where exactly would this fit into the query in the question?
Aidan Ryan