Calculated Measure for Issue Links Count

Hello,
I imported an Issue Link with dimension and property called ‘Issue Related Bugs’, and tried to define a new calculated measure to retrieve a count for bugs linked to a story by the below script.
Count(
Filter(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
Not IsEmpty([Measures].[Issue Related Bugs])
AND
[Measures].[Transitions to status issues count] > 0
)
)
It returns the count of stories not the count of bugs. How can I get the count of bugs?
Can anybody throw some light on this?

Thanks,
Bob

Hi @Bob,

Your calculation counts issues that have linked bugs but not the bugs. You can slightly adjust the calculation and use the dimension “Related Bugs”, not the “Issue” dimension,

Count(
  Filter(
    --iterate through Related Bugs members
    Descendants([Related Bugs].CurrentMember, [Related Bugs].[Related Bugs]),
    [Measures].[Transitions to status issues count] > 0
  )
)

Please make sure to import the “Related Bugs” as both – property and dimension to make this work.

There is an alternative option if you have the “Issue” dimension on report rows showing each story. In that case, you can create a calculated measure that would count how many commas you have in the list of linked bugs for each story. See this Community post for more details:

Best,
Zane / support@eazyBI.com