Team System Developer Center > Visual Studio Team System Forums > Team Foundation Server - Reporting & Warehouse > Update Bug Rates Report to run off of Week or Month as opposed to Days
Ask a questionAsk a question
 

AnswerUpdate Bug Rates Report to run off of Week or Month as opposed to Days

  • Monday, November 02, 2009 7:36 PMmrpeepers Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Has Code
    Currently two of the filters are start and end date.  Could the report be changed to select the months to report on?  So the day-dates displayed on the baseline of the report are weeks or months as opposed to days?

    I don't know how to GROUP and SUM the dates and open Work Items... Here's my Bug Rates code below. 

    WITH
    MEMBER [Measures].[Date Value] AS
        [Date].[Date].CurrentMember.Member_Value
    
    MEMBER [Measures].[Active Cumulative] AS
    Sum(
       {
            {StrToMember("[Work Item].[System_State].[System_State].[" + @Active + "]"),
            StrToMember("[Work Item].[System_State].[System_State].[" + @Development + "]")} *
             [Work Item].[System_Reason].[System_Reason]         
        },
        [Measures].[Cumulative Count]
        )
    
    MEMBER [Measures].[Active StateChange] AS
    Sum(
       (
            StrToMember("[Work Item].[System_State].[System_State].[" + @Active + "]"),
             [Work Item].[System_Reason].[System_Reason]          
        ),
        [Measures].[State Change Count]
        )
    
    MEMBER [Measures].[Resolved StateChange] AS
    Sum(
       (
            StrToMember("[Work Item].[System_State].[System_State].[" + @Resolved + "]"),
            StrToMember("[Work Item].[System_Reason].[System_Reason].[" + @Fixed + "]")      ),
        [Measures].[State Change Count]
        )
    
    SELECT
    {
        [Measures].[Date Value],
        [Measures].[Active Cumulative],
        [Measures].[Active StateChange],
        [Measures].[Resolved StateChange]
    } ON COLUMNS,
    (
        Filter(
            [Date].[Date].[Date],
            [Date].[Date].CurrentMember.Member_Value >= CDate(@StartDateParam) AND
            [Date].[Date].CurrentMember.Member_Value <= CDate(@EndDateParam)
        )
    ) ON ROWS
    FROM
    (
        SELECT
        (
            STRTOMEMBER("[Team Project].[Team Project].[" + @Project + "]"),
    	    STRTOSET(@IterationParam),
    	    STRTOSET(@AreaParam),
    	    STRTOSET(@PriorityParam),
    	    StrToMember("[Work Item].[System_WorkItemType].[System_WorkItemType].[" + @Bug + "]")
        ) ON 0
        FROM [Team System]
    )
    
    
    • Edited bymrpeepers Monday, November 02, 2009 7:40 PMediting
    •  

Answers

All Replies