Calculate only Hours Spent of completed items in a Sprint

We have the “Hours Spent” in a sprint on the items included
but we want to have also “Hours Spent” of “Completed” items only.

What is the way to do it? (hopefully possible within the same report)

Yes, you are correct. Measure Hours spent represents the total time spent on the issue while in sprint no matter if the issue was completed in the sprint or not.

Here is an example formula pulling in logged time from completed issues only. It iterates through all issues of the sprint and retrieves the total logged time during the sprint.

    Descendants([Issue].Currentmember, [Issue].[Issue]),
    IIF ([Sprint].CurrentHierarchyMember is [Sprint].CurrentHierarchy.DefaultMember, 1,
    -- validate if issue was in any sprint at completion      
    -- access a selection of sprints in the report
      DescendantsSet([Sprint].CurrentHierarchyMember, [Sprint].CurrentHierarchyMember.Levels("Sprint")),
      -- compare it to sprints of issue
        [Sprint].[Sprint].CurrentHierarchy.Levels('Sprint').GetMembersByKeys([Issue].CurrentMember.Get("Sprint IDs"))
      ))) > 0
      [Measures].[Sprint issues completed] > 0
      NonZero( [Measures].[Hours spent])

Daina /

1 Like

Thank you very much for the support ! it seems to work (we are testing it)

hello @daina.tupule , is there a way to make the formula a little less memory demanding? I’m trying to use it but I get a lot of out of memory errors… and I’m calculating just a couple of sprints.