Leadtime to Release

Hi
I have tried the exact same thing but haven’t managed to make it work.
I’m trying to calculate the number of workdays that have passed between the ticket status “In Test” to the end of the sprint. So far I have written this script but it’s not working…

Thank you for your help!

image

Hi @Thibault,

The calcaution looks all right, but the report should meet certain conditions to make it work.

  1. The report should have the “Fix Version” dimension on pages, rows, or columns. And a single version should be selected for the report so that calculation could find the release date of that version and use in calcaution.
    This expression [Measures].[Version release date] reads the release date for calcualtion

  2. The calcaution considers only resolved issues (has resolution date). If the issue has entered the testing status, but its resolution data is empty, then the calculation would ignore that issue.
    This expression [Measures].[Issues resolved] > 0 filters only resolved issues in the selected period.

Here is the code with additional comments that might help you to understand what the calculation does.

CoalesceEmpty(Avg(
  --set of issues that are resolved in selected periods
  Filter(
    Descendants([Issue].CurrentMember,[Issue].[Issue]),
    [Measures].[Issues resolved] > 0
  ),
  --for each issue, calcauted duration in working days
  DateDiffWorkdays(
    --from entering status A tester for the last time
    ([Measures].[Transition to status last date],
    [Transition Status].[A tester],
    [Time].CurrentHierarchy.DefaultMember),
    --till the release date of a version that is selected in the report
    [Measures].[Version release date]
  )
),0)

In the question, you mentioned “Sprint.” If you use Sprints instead of Version to plan your iterations, then you should update the calcaution and report accordingly: use the Sprint dimension on report pages and property [Measures].[Sprint actual end date] for the calculation (not version release date).

Best,
Zane / support@eazyBI.com