Calculated Measure to get number of stories and bugs per Epic

Hello, great community!
I’m working on a lot of different projects in our Jira and I’d like to calculate the average ‘size of Epic’.
To do so, I need to create a few calculated measures that will show:

  • Number of stories inside each Epic
  • Number of Bugs inside each Epic (in fact the same as for stories, just another issue type).

I’m not interested in stories and bugs that are related to Epic by ‘link issue’, the main idea is to rely on ‘Epic link’ field (“Issues in this epic”).
I’m almost sure that the solution is simple as for me it sounds like a common measure to track.

Example of how it would be nice to have it in the report (note: I’ve just edited html to visualise the desired result)

And example of the issues that I’d like to calculate

I’ve spent hours on ‘fighting’ with that, but no results. I hope someone here can help
Thank you in advance

@Anton

First, make sure you select to import “Epic link” field from the import options page.
That would create new “EPic link” dimension as well as Issue.Epic hierarchy that you can use in your report.

Then create 2 new calculated measures using these formulas:

Issues in Epic:

Count(Childrenset([Issue.Epic].Currentmember))

Bugs in Epic:

(
[Measures].[Issues created],
[Issue type].[Bug]
)

Martins / eazyBI