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

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 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 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 specific period between two dates.