Accessing linked issues

Hi @SaVer

Yes, it is possible to count both the number of linked issues and the number of issue links without having the Issue dimension in the report rows.

Linked issues: the number of issues that are linked to other issues; if one issue is linked to several issues, it is still counted as 1 linked issue.
Issue links: the number of how many links are for issues in project/issue type/etc. If three issues have the same issue linked to, the number of links would be 3.

  1. If you want to get the number of linked issues (by project, for instance), you may create a measure that iterates through all linked issues and retrieves those related to the report context.
    Let’s say linked issues are imported into Linked issues dimension; in the calculation use your linked issues dimension name.
Nonzero(Count(
   Filter(
     Descendants([Linked issues].CurrentMember, [Linked issues].[Linked issues]),
    [Measures].[Issues created count]>0
    )
  ))

  1. To get the number of issue links, you have to iterate through all issues and access the issue property and count issue links for each issue.
    While this approach uses issue property, the issue dimension is not necessary for the report as the calculation always goes through all issues and accesses each.
Sum(
  Filter(
   Descendants([Issue].CurrentMember, [Issue].[Issue]),
   Not IsEmpty([Issue].CurrentMember.get('Linked issues'))),
   CASE WHEN
     [Measures].[Issues created]>0
   THEN
     Len([Issue].CurrentMember.get('Linked issues')) 
     - Len(Replace([Issue].CurrentMember.get('Linked issues'), ',', '')) 
     + 1
   END
  )
)

Again, please check and use correct linked issue dimension and property name!

As this approach iterates through all issues, it might be slow. If the report with this times out or you need to use it in further calculations, you may consider precalculating this value.
You may check the community thread Question: Counting the Number of Linked Issues where my colleague Lauma advised how to calculate the number of links for each issue during data import, using JavaScript calculated custom field.

Best,
Ilze, support@eazybi.com