All eazyBI for Jira eazyBI for Confluence Private eazyBI

DateBetween

EAZYBI Returns true  if a date is between the other two dates. Otherwise, returns false .

Syntax

 DateBetween(Date_Expression, From_Date_Expression , To_Date_Expression)

Arguments

Date_ExpressionMDX expression that returns a date that needs to be checked.
From_Date_ExpressionMDX expression that returns a starting date for the between period. 
To_Date_ExpressionMDX expression that returns an ending date for the between period. 

You can also use a string expression that can be parsed with DateParse as any date argument.

Examples

Number of issues resolved during a Sprint that are not related to any sprint

NonZero(
  Count(
    Filter(
      Descendants([Issue].CurrentMember, [Issue].[Issue]),
      (
        [Measures].[Issues resolved],
        [Sprint].[Sprint].[(no sprint)]
      ) > 0
      AND
      DateBetween(
        [Measures].[Issue resolution date],
        [Measures].[Sprint actual start date],
        [Measures].[Sprint actual end date]
      )
    )
  )
)

The above formula will count the number of issues not associated with a sprint that were resolved in the currently selected Sprint period. The Sprint dimension Sprint members must be used in Rows or Pages for this formula to work.

Check if the current Time member falls within the Version period

CASE WHEN
  DateBetween(
    [Time].CurrentHierarchyMember.StartDate,
    [Measures].[Version start date],
    [Measures].[Version release date]
  )
THEN
  1
END

The above formula will mark periods on timeline when a version was active. The formula will set value for 1 any period on a timeline  if the first date of the period is between Version start date and Version end date. 

See the example report Version issues guideline in our demo account. The calculated measure Time within version uses the formula above and works as a filter in the report to show a timeline of the version. 

See the example report Version report in our demo account for a more advanced usage of the function DateBetween in the calculated measure Time in version. This formula uses function DateBetween with version start date and the latest of two dates (Version release date or Predicted completion date) for the end date.

See also

Time calculated members work best with DateMembersBetween to retrieve a specific period between two dates.