Timeout caused by a measure

Hello
I am receiving timeout when trying to execute this measure (there is also a filter by board)

– days in transition status when issue was in this status in previous times

[Measures].[Days in transition status]
+
-- days since last transition to this status
NonZero(SUM(Filter(
  Descendants([Time].CurrentMember,[Time].[Day]),
  -- for unresovled issues only
  IsEmpty([Issue].CurrentHierarchyMember.Get("Closed at"))
  AND
  [Measures].[Issue status] = "Blocked"
  ),
  CASE WHEN
  [Measures].[Issues history] > 0
  THEN
  DateDiffDays(
    [Measures].[Issue status updated date],
    Now()
  )
  END
))

is there any way to optimize it?
thanks a lot

Hi @scontu,
from the formula, it seems that you want to sum Issue days in the selected status till now. In that case, I suggest using the measure “Days in transition status till now” from this report: Issue days in selected status - Issues - Jira Demo - eazyBI
And filter by dimension “Transition Status” value “Blocked”.

Your formula gets timeout because you are iterating through the “Time” dimension “Day” level (with function Descendants() and [Time].[Day] it can cause performance problems), plus you are filtering days by issue properties although the Issue dimension is not used in your formula.

kind regards,
Gerda // support@eazyBI.com