Get Epic Completion Percentage

I have a dependency report wherein there are issues(filtered to epics) as my main row and issue depends on(filtered to epics) as a measure in column which is a calculated member that provides the issue id’s of the issues that my main issue is dependent on.
Dependency has been created using the issue link “Depends On” in EazyBI.
My requirement is to get the epic progress(completion percentage:
{issues resolved under epic*100/issues created under epic}) for each epic in the set of ‘issue depends on’, using their issue id’s to generate the completion percentage utilizing the statuses of the issues under each epic of the set.

Hi @SM27

In this case, you could make sure that “Epic Link” field is selected and imported.

Then you could create a new user-defined measure using the following formula:

CASE WHEN
[Measures].[Issue type] = "Epic"
THEN
Generate(
Filter(
[Depends on].[Depends on].Getmembersbykeys(
  [Issue].CurrentHierarchyMember.get('Depends on')
),
[Issue Type].[Issue type].getMemberNameByKey(
  [Depends on].CurrentHierarchyMember.get('Issue type ID')
) = "Epic"
),
Cast(
CASE WHEN
Aggregate( 
	Except( 
	[Issue Type].[Issue Type].Members, 
	{ 
		[Issue Type].[Epic]
	}),
	(
[Epic Link].[Epic].Getmemberbykey(
  [Depends on].CurrentMember.key
),
[Depends on].DefaultMember,
[Issue].CurrentHierarchy.DefaultMember,
[Measures].[Issues created]
)
)>0
THEN
  CASE WHEN
  Aggregate( 
Except( 
[Issue Type].[Issue Type].Members, 
{ 
  [Issue Type].[Epic]
}),
(
  [Epic Link].[Epic].Getmemberbykey(
[Depends on].CurrentMember.key
  ),
  [Depends on].DefaultMember,
  [Issue].CurrentHierarchy.DefaultMember,
  [Measures].[Issues resolved]
  )
  )>0
  THEN
  Round(
  (
  (
  Aggregate( 
Except( 
[Issue Type].[Issue Type].Members, 
{ 
  [Issue Type].[Epic]
}),
(
  [Epic Link].[Epic].Getmemberbykey(
[Depends on].CurrentMember.key
  ),
  [Depends on].DefaultMember,
  [Issue].CurrentHierarchy.DefaultMember,
  [Measures].[Issues resolved]
  )
  )*100
  )
  /
  Aggregate( 
Except( 
[Issue Type].[Issue Type].Members, 
{ 
  [Issue Type].[Epic]
}),
(
  [Epic Link].[Epic].Getmemberbykey(
[Depends on].CurrentMember.key
  ),
  [Depends on].DefaultMember,
  [Issue].CurrentHierarchy.DefaultMember,
  [Measures].[Issues created]
  )
  )
  ),1
  )
  ELSE
  0
  END
END
as string),  ' | '
)
END

It would calculate the completion percentage of depends on epic and display results for epic level rows.

See also the attached image
Martins / eazyBI support

1 Like

SM27, would you mind sharing your code for ‘depends on’?

Hi @sbeaudin

While @SM27 hasn’t responded, you could explore the possibility to import issue links in our documentation page:
https://docs.eazybi.com/eazybijira/data-import/advanced-data-import-options/import-issue-links

Martins / eazyBI team

1 Like