All eazyBI for Jira eazyBI for Confluence Private eazyBI

DateBetween

EAZYBI Returns if a date is between other two dates.

Syntax

 DateBetween(date, from_date , to_date)

Arguments

dateMDX expression that returns a date
from_dateMDX expression that returns a date
to_dateMDX expression that returns a date

You can use also 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.