All eazyBI for Jira eazyBI for Confluence Private eazyBI

DateDiffWorkdays

EAZYBI Returns the number of working days (by default excluding Saturday and Sunday) from the first date to the second date.

Syntax

DateDiffWorkdays(From_Date_Expression, To_Date_Expression)

or

DateDiffWorkdays(From_Date_Expression, To_Date_Expression, Non_Work_Days_String)

Arguments

From_Date_Expression

MDX expression that returns the first date of the calculation. If the first date is a workday, it will be included in the calculation.

To_Date_Expression

MDX expression that returns the second date of the calculation. Date until which to count workdays; this day itself will be excluded from the result.
Non_Work_Days_String

Specify a string with non-working day numbers (use 1 for Monday, 2 for Tuesday, 3 for Wednesday, 4 for Thursday, 5 for Friday, 6 for Saturday, 7 for Sunday).

If not specified, then '67' is used, which means Saturday and Sunday.

If Time dimension options are specified, then these Time dimension non-working days will be used (in this case, please do not specify this argument).

Examples

The following example shows how many working days passed from the issue creation date until it was resolved (resolution day is not included).

DateDiffWorkdays(
  [Issue].CurrentHierarchyMember.Get('Created at'),
  [Issue].CurrentHierarchyMember.Get('Resolved at')
)

The same example returns the difference in working days from the Issue created date until resolution if non-working days are Friday and Saturday:

DateDiffWorkdays(
  [Issue].CurrentHierarchyMember.Get('Created at'),
  [Issue].CurrentHierarchyMember.Get('Resolved at'),
  '56'
)

See also

  • Function DateDiffDays() which returns a number of days between two dates.