All eazyBI for Jira eazyBI for Confluence Private eazyBI

DateDiffHours

EAZYBI Returns the difference in hours from the first date to the second date.

Syntax

DateDiffHours(From_Date_Expression, To_Date_Expression)

Arguments

From_Date_Expression

MDX expression that returns the first date of the calculation.

To_Date_Expression

MDX expression that returns the second date of the calculation.

Examples

Hours passed since the creation till the issue entered In Progress status

The following example calculates the difference in hours between the Issue created time and the time when the Issue first entered the "In Progress" status.

DateDiffHours(
  [Measures].[Issue created date], 
  (
    [Measures].[Transition to status first date],
    [Transition Status].[In Progress]
  )
)

Average closing hours for issues created

The following formula returns the average number of hours for the issues to be closed. If the Time dimension is used, the hours are grouped in periods by the issue creation date. Be sure that the Issues closed measure is set up with the expected statuses.

Avg(
  Filter(
    Descendants([Issue].CurrentHierarchyMember, [Issue].[Issue]),
    [Measures].[Issues created] > 0
    AND
    NOT IsEmpty([Issue].CurrentHierarchyMember.Get('Closed at'))
  ),
  DateDiffHours(
    [Issue].CurrentHierarchyMember.GetDate('Created at'),
    [Issue].CurrentHierarchyMember.GetDate('Closed at')
  )
)

See also