How to get the number of Stories with sub-tasks of a given type?

Hi,

I’m trying to get the number of issues that have sub-tasks of a given type (“Sub-bug”).
I want the following:

  • Issues resolved - number of issues resolved within a sprint;
  • Issues with sub-bugs resolved - number of issues resolved within a sprint, with sub-tasks of the type “Sub-bug” resolved;
  • Sub-bugs resolved - number of sub-bugs resolved.

The following image tries to represent the report:

Captura de ecrã 2024-04-09, às 13.17.06

At the moment, I have the following measure, but it misses the filter of sub-tasks of a given type:

Sum(
Filter(
Descendants([Issue].CurrentMember,[Issue].[Issue]),
not IsEmpty([Measures].[Issue sub-task keys])
),
IIF(
[Measures].[Sub-tasks resolved] > 0,
1,
NULL
)
)

Can you help me with that?

1 Like

Hi, @bfreire

Welcom to the eazyBI community.

Please consider creating a tuple to filter the Sub-bugs.
You need to retrieve the parent issue member based on the key of the current sub-task issue member. Please consider using the GetMemberByKey: GetMemberByKey

[Issue.Sub-task].[Parent].GetMemberByKey(
  [Issue].CurrentHierarchyMember.KEY)

The final tuple would look something like this:

([Measures].[Issues created],
[Issue.Sub-task].[Parent].GetMemberByKey(
  [Issue].CurrentHierarchyMember.KEY),
[Issue].CurrentHierarchy.DefaultMember,
[Issue Type].[Sub-Bug]  
)

Please double-check the issue type and integrate this into your formula instead of [Measures].[Sub-tasks resolved] > 0

Kindly,
Ilze