Days to first transition to multiple statuses

Hello!

I would like to get the number of days required for an issue to reach either status A, B or C (whatever happens first). I know about predefined measure ‘Transition to status first date’, but for my example I would need something like ‘Transition to statutes first date’.

I have the following code snippet but it only works for individual transition statuses:

  Percentile(
   Filter(
   Descendants([Issue].CurrentMember, [Issue].[Issue]),
   [Measures].[Transitions to status] > 0
   AND
   not isEmpty([Measures].[Issue resolution date])
   ),
   -- can substitute below function with DateDiffWorkdays if necessary
   DateDiffDays(
   [Issue].CurrentHierarchyMember.get('Created at'), 
   [Measures].[Transition to status first date]),
   90
  )

HI @Uros_Kovac
Welcome to the eazyBI community!

You are almost there with your calculation!
Measure “Transition to status first date”, used together with a calculated Transition Status member, always take the first transition date to any of the statuses included in the member.
So, if you select this Transition Status calculated member in the report Pages, you would get the first transition date to any of those statuses. Nothing should be added to the calculation (only Transition Statuses selected in Pages).

I would suggest changing the order of the filter conditions in the formula, so the filters by properties would be first; it improves the performance of the measure.

Percentile(
   Filter(
   Descendants([Issue].CurrentMember, [Issue].[Issue]),
   not isEmpty([Measures].[Issue resolution date])
   and 
   [Measures].[Transitions to status] > 0),
   -- can substitute the below function with DateDiffWorkdays if necessary
   DateDiffDays(
   [Issue].CurrentHierarchyMember.get('Created at'), 
   [Measures].[Transition to status first date]),
   90
  ) 

Best,
Ilze, support@eazybi.com