Monthly average time to close for issues created during said month

How can I get the Monthly average of time to close, as a measure of the number of days from the start date to the end date, for issues created in a said month (but issues can be closed same or any subsequent month)?

planning on representing this through a bar chart that shows all the months and corresponding averages

This is what I came up with so far

Avg(
Filter(
Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
[Measures].[Issues created] > 0
)
,
DateDiffDays([Measures].[Issue Start Date (Agile Roadmaps)],
[Measures].[Issue End date])
)

I want to add the condition [Measures].[Issues resolved] > 0 for closed issues, where I can see the end date, and in cases where I don’t see the end date (unresolved issues) I want to consider the date up till Now() and do the average across all those date diffs together. How do I go about this?

This worked but I’m unable to filter further by type

Hi @resolveme

Welcome to the eazyBI community!
You are almost there with the calculation. Add the IIF to process both cases - for resolved and unresolved issues.
To filter by issue type, add the Issue Type dimension in the report Pages. You can also add that in the calculation, see commented out line.

Avg(
Filter(
Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
--[Measures].[Issue type]="Bug" AND
[Measures].[Issues created] > 0
)
,
IIF(
not IsEmpty([Measures].[Issue End date]),
DateDiffDays([Measures].[Issue Start Date (Agile Roadmaps)],
[Measures].[Issue End date]),
DateDiffDays([Measures].[Issue Start Date (Agile Roadmaps)],
Now())
)
)

Best,
Ilze / support@eazybi.com

1 Like