Custom Sub-task type is not available in measures

Hello everyone,

I am currently struggeling with a report including the amount of Sub-Tasks. We have two different types of Sub-Task types: Sub-Task and Defect.
I would like to create a report that shows the amount of “Defect” subtasks and “Sub-Task” subtasks for each Story.

If I select the “Sub-Tasks created” measure, all sub-task types are counted and I am struggling to separately count them.

I already searched and found a solution that proposes to use

(
  [Measures].[Issues created],
  [Issue Type].[Defect]
)

but that gives back only very few Defects.

Thank you very much in advance for your help :slight_smile:

@DaSeidl

Try creating a new user-defined calcualted measure using this formula to count Defect type subtasks for each parent type Story

CASE WHEN
Not IsEmpty([Measures].[Issue sub-task keys])
THEN
Sum(
  Filter(
    [Issue].[Issue].GetMembersByKeys(
      [Measures].[Issue sub-task keys]
    ),
    [Issue Type].[Issue Type].getMemberNameByKey(
      [Issue].CurrentHierarchyMember.get('Issue type ID')
    ) = "Defect"
  ),
  DefaultContext(
    (
      [Issue].CurrentHierarchyMember,
      [Measures].[Issues created]
    )
  )
)
END

Martins / eazyBI