Average time assigned to Reporter- Query too complex

Hi,

I need to calculate the average time issues are assigned to specific reporters.
I created a calculated measure which should give me the correct result, but it always times out.

I tried removing all Page dimensions, select only 1 reporter and limit time to last week, and it still times out.

Could someone help me simplify this query please?

Avg(
Filter(
Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]),
-- time assigned to reporter
(
[Measures].[Days in transition status],
[Transition Field].[Assignee],
[Assignee].[User].GetMemberByKey(
  [Reporter].CurrentMember.Key)
 )>0 
AND
[Measures].[Issues created]>0
)
,
-- time assigned to reporter
(
[Measures].[Days in transition status],
[Transition Field].[Assignee],
[Assignee].[User].GetMemberByKey(
  [Reporter].CurrentMember.Key)
 )
)

Thanks,

Hi,

Indeed, iterating through issues and their history is a slow calculation. Also, “Days in transition status” used in this calculation is not related to days the issue was assigned to the user, but rather calculates days in some status and, used together with Assignee dimension, shows those days in status to the assignee that was the issue assignee during the transition from the status.

You may want to use JavaScript calculated custom field to get the days the issue was assigned to the reporter.
As an example, you may use a calculation that calculates days issues was assigned to a particular user (you would need to add additional conditions in the JavaScript code to retrieve only days for the assignee that is the same as the reporter): JavaScript calculated custom fields - eazyBI for Jira

Best,
Ilze, support@eazybi.com