All eazyBI for Jira eazyBI for Confluence Private eazyBI

DateDiffWorkdays

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

Syntax

 DateDiffWorkdays(from_date, to_date)
 DateDiffWorkdays(from_date, to_date, nonworkdays)

Arguments

from_date
MDX expression that returns a date. Starting date that, if it is workday, will be included in calculation.
to_date
MDX expression that returns a date. Date until which to count workdays; this day itself will not be included in calculation even if it is workday.
nonworkdays

Specify 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

Following example shows how many working days passed from 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 that returns difference in working days from 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 number of days between two dates.