Issue with performance - filter issues set

Hello!!!
I am trying to calculate real “Lead Time”, and get the following report
Month, Issues count, Lead time, Average lead time

Issues count - number of issues that were Done in the period of time
Lead time - number of days that issues (from Issues count) were in To Do
Average lead time = Lead time/ Issues count

I created To Do members - like [Transition status].[Unresolved status]:
Aggregate({
[Transition status].[Open],
[Transition status].[Preparation],
[Transition status].[Backlog],
[Transition status].[In Progress]
})

and trying to iterate issues set
Sum(
Filter(Descendants([Issue].CurrentMember, [Issue].[Issue]),
DateInPeriod([Issue].CurrentMember.get(“Resolved at”), [Time].CurrentHierarchyMember) AND
[Measures].[Issues resolved] > 0),
([Measures].[Workdays in transition status],
[Transition status].[Unresolved status],
[Time].CurrentHierarchy.DefaultMember)
) / [Measures].[Issues resolved]

but I am getting error likes out of Memory or another

please, could you help me - maybe it can be done with some smart approach (i.e. Cache, etc.)

Hi @DKostiuk

Try this a slightly better version of your formula

Sum(
Filter(Descendants([Issue].CurrentMember, [Issue].[Issue]),
DateInPeriod([Issue].CurrentMember.get("Resolved at"), [Time].CurrentHierarchyMember) 
),
CASE WHEN
[Measures].[Issues resolved] > 0
THEN
([Measures].[Workdays in transition status],
[Transition status].[Unresolved status],
[Time].CurrentHierarchy.DefaultMember)
END
) 
/ 
[Measures].[Issues resolved]

If you find it still slow, please think about using Issue cycles instead.
https://docs.eazybi.com/eazybi/data-import/data-from-jira/issue-cycles
https://docs.eazybi.com/eazybi/learn-more/learn-eazybi-through-sample-reports/samples-cycle-time

Martins / eazyBI

Hi,
I am thinking of creating a calculated customfield to sum up of total time Cycle time per issue
the question is - will it be connected to TIME based on Resolution date ? How to do this connection?

@DKostiuk

It depends how would you import the field.
If that is a scripted field that returns an integer number and you define it as “measure” from the advanced settings and later import as “measure”, you would see a new measure “Cycle time per issue resolved” which would be mapped to Time dimension by resolution dates.

See this page on totals by custom fields: Jira custom fields

Martins / eazyBI