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!
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] (https://docs.eazybi.com/display/EAZYBI/DateDiffDays) 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
-- 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
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