Avg days between two statuses

Hello
I’m trying to find the average number of days it takes for issues to go from the transition status In Progress to the transition status Waiting for Production.
I’ve tried this solution: How many average days need Issues between 2 statuses - #2 by janis.plume
However it counts days from any statuses the issue was in before it went into In Progress.
Is there a way just to see the average days from In Progress to Waiting for Production, including any statuses inbetween for each month?

Hi @joejames

Please find similar question discussed here:

Martins / eazyBI

Hi @martins.vanags - thanks for your reply.
The only issue with Calculate Lead/Cycle Time From Specific Statuses is that it calculates days from the chosen status to the resolved time. I need to calculate average days from In Progress to Waiting for Production.
Is there any way to change it?
Thanks again
Joe

@joejames

Try this code:

CASE WHEN 
(
[Measures].[Transitions to status],
[Transition Status].[Waiting for Production]
) > 0 
THEN
 AVG(
    Filter(
      Descendants([Issue].CurrentMember, [Issue].[Issue]),
      (
        [Measures].[Transitions to status],
        [Transition Status].[Waiting for Production]
      ) > 0 
    ),
    DateDiffDays(
      (
       [Measures].[Transition to status first date],
       [Transition Status].[In Progress],
       [Time].CurrentHierarchy.DefaultMember
       ),
      (
       [Measures].[Transition to status last date],
       [Transition Status].[Waiting for Production]
       )
    )
  )
END

It will calculate the average difference between the very first transition to In progress until the last transition to “Waiting for Production” for issues that went to the Waiting for Production status in the report context.

This solution is not great for cases where one issue travels between both these statuses multiple times.

Martins / eazyBI

Thanks @martins.vanags I’ve added the code but no data shows, tried it with individual issues and as months as a whole. I’ve double checked the data and there are issues in there that’ve moved from in progress to waiting for production.
Any ideas??

@joejames
I just found that the measure “Transition to status last date” was incorrectly used in the previous formula.
Try the formula again. I just updated it in the previous answer.
I am sorry for not noticing this earlier, but I don’t have “Waiting for Prodution” status, therefore I couldn’t check this formula properly.

Martins

Works perfectly, thanks for your help!

1 Like