MTTD Calculation

Good day,

I’m using easybi with Jira. My Jira project has two custom datetime fields named “Incident Occurred” and “Incident Detected”.
I’m trying to calculate the MTTD (Mean Time to Detect) across the time dimension and I’m totally puzzled on how exactly do I do that.

Thanks in advance!

Hi @CVirus

Welcome to the eazyBI community!

Measures “Issues with Incidents Detected” and “Issues with Incidents Occured” are calculating a total of issues having on or another (accordingly) date in a given week.
To calculate days difference between those two dates for each issue, you may want using [DateDiffDays(…) function] ( between issue properties “Issue Incident Occured” and “Issue Incident Detected” and then calculated the average of this difference over all the issues having the Incident Detected date in each time period (week).

For that, create the following measure in Measures:

  -- Filter issues that have "Incident Detected" date in the period
  Filter(Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
    DateInPeriod([Issue].CurrentHierarchyMember.get('Incident Detected'), 
      [Time].CurrentHierarchyMember) AND 
   -- and Incident Occured date is not empty
    NOT IsEmpty([Issue].CurrentHierarchyMember.get('Incident Occured')) AND 
   -- and are created in the current report context
    ([Measures].[Issues with Incident Detected], 
     [Time].CurrentHierarchy.DefaultMember) > 0 
        [Issue].CurrentMember.get('Incident Detected'),
        [Issue].CurrentHierarchyMember.get('Incident Occured'))

Explenation: [Issue].CurrentMember.get(‘Incident Detected’) and [Issue].CurrentHierarchyMember.get(‘Incident Occured’) are the same properties “Issue Incident Detected” and “Issue Incident Occured”

You may also check another community discussion with a similar use case: Imported Custom Field & Time Calculations