Calculated Measure - Is Caused By

In Jira I am tracking defects by using the following filter: issuetype in (Bug, Firedrill) AND linkType = “is caused by”

I want a count of how many defects I have in the quarter. I am already able to see the number of issues I completed in the quarter…but I’m struggling to get a count of defects in the same report (I call that calculated measure - Sprint Issues Completed - Defects).

My report is: Row: Time, Pages: Project, Issue Types and Measures (Sprint Issues Completed, Sprint Issues Completed - Defects)

I’m pulling in “Is Caused By” with the following:
[jira.customfield_is_caused_link]
name = “Is Caused”
inward_link = “is caused by”
multiple_values = true
dimension = true

The report would look like this:
Quarter | Sprint Issues Completed | Sprint Issues Completed - Defects | Defect Percentage
Q1 | 300 | 6 | 2%

Hi Kevin,

First, you may want to check out whether the linked issues are imported correctly: whether the dimension “Is Caused” contains Bugs and Firedrills. Just move the dimension in rows and expand to check it.

If there are problems with imported data you may go through issue links troubleshooting page and check most common problems (correct link name and link direction): https://docs.eazybi.com/eazybijira/data-import/advanced-data-import-options/import-issue-links#Importissuelinks-Troubleshooting

When data seems correctly imported, you may create a new calculated measure (in Measures) to count sprint defects. The calculation formula for the measure could be the following:

Case 
When
  [Issue].CurrentMember.Level.Name = "Issue"
  AND
  [Is Caused].CurrentMember is [Is Caused].Defaultmember
Then
  -- retrieve Is Caused information from Issue property Is Caused
  Case when
not isEmpty([Issue].CurrentHierarchyMember.Get('Is Caused'))
  then
NonZero(AVG(
[Issue].[Issue].GetMembersByKeys(
  [Issue].CurrentHierarchyMember.get('Is Caused')),
  DefaultContext((
    [Measures].[Sprint issues completed],
    [Issue].CurrentMember,
    [Sprint].CurrentMember,
    [Time].CurrentHierarchyMember))
))
  end
Else
 -- total calculation for any issue, data on Is Caused level
  NonZero(AVG(
Filter(
  Descendants([Is Caused].Currentmember, [Is Caused].[Is Caused]),
  -- filter out Is Caused with reference to Issue
  ([Measures].[Sprint issues completed],
  [Time].CurrentHierarchy.Defaultmember) > 0),
-- search for Is Caused in Issue dimension, use in a tuple with measure and time and sprint, ignore anything else with DefaultContext    
DefaultContext((
  [Measures].[Sprint issues completed],
  [Issue].[Issue].GetMemberByKey([Is Caused].Currentmember.Key),
  [Time].CurrentHierarchyMember,
  [Sprint].CurrentMember,
  [Is Caused].DefaultMember
))
 ))
End

You may check out a sample report in one of our demo accounts where linked issue information is used in the report (dimension Bugs contain linked bugs) and there are several useful measures used in the report to count linked bugs etc and which you may modify and use in your case: https://eazybi.com/accounts/22010/cubes/Issues/reports/141158-story-and-bug-overview-by-projects

Best,
Ilze, support@eazybi.com