I would like to create a measure that captures the number of tickets that entered a High, Critical, or Urgent priority within a specified time period and are still currently in one of those priorities.
A ticket can enter these priorities either by:
- being created with a High/Critical/Urgent priority, or
- being transitioned to one of these priorities for the first time.
My current calculated measure is:
-- -- created into this priority and has never been transitioned
NonZero(Count(
Filter(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
[Measures].[Issues created] > 0
AND
IsEmpty((
[Measures].[Transition to first timestamp],
[Transition Field].[Priority],
[Time].CurrentHierarchy.DefaultMember
))
)
))
+
-- -- first escalation to priority
Filter(
Descendants([Issue].CurrentMember, [Issue].[Issue]),
([Measures].[Transitions to issues count],
[Transition Field].[Priority]) > 0
AND
DateInPeriod(
TimestampToDate(
([Measures].[Transition to first timestamp],
[Transition Field].[Priority],
[Time].CurrentHierarchy.DefaultMember)
),
[Time].CurrentHierarchyMember
)
)
))
However, this calculation always times out, so I haven't been able to get any results.
Is there a more efficient way to achieve the same result, or a way to optimise this calculation so that it is less computationally expensive?