All eazyBI for Jira eazyBI for Confluence Private eazyBI

DateAddWorkdays

EAZYBI Returns a date plus a specified number of workdays.

Syntax

DateAddWorkdays(Date_Expression, Numeric_Expression)

or

DateAddWorkdays(Date_Expression, Numeric_Expression, Non_Work_Days_String)

Arguments

Date_Expression

MDX expression that returns a date to which the days will be added.

Numeric_Expression

Integer expression for a number of days to add.

By default, Saturdays and Sundays are considered as non-working days.

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

This example will add 5 workdays to the Issue created date, using the account default non-working days.

DateAddWorkdays([Issue].CurrentMember.Get('Created at'), 5)

This example will add 5 workdays to the Issues created date, using Saturday and Sunday as non-working days.

DateAddWorkdays([Issue].CurrentMember.Get('Created at'), 5, '67')

The example below calculates the predicted date to complete unresolved issues based on recent progress in the project

DateAddWorkDays("Today",
  -- remaining scope
  (
    [Measures].[Issues due],
    [Time].CurrentHierarchy.DefaultMember
  )
  /
  -- average resolved issues per week in last 52 weeks
  Avg(
    {[Time.Weekly].[Week].CurrentDateMember.Lag(52):
    [Time.Weekly].[Week].CurrentDateMember.PrevMember},
    CoalesceEmpty(
	  ([Measures].[Issues resolved],
	  [Time].DefaultMember),
	  0
    )
  )
  * 5  -- workdays in a week
)

See report example Predicted completion date in our Demo account. The calculated measure Rolling predicted date uses the formula above to calculate a date in how many days from today unresolved issues will be resolved if the progress will be similar to the last 52 weeks and no new issues will come in. The remaining scope / average pace per week gives a count of predicted weeks. They are multiplied by 5 workdays per week to get total predicted workdays that could be added from Today.

See also