Am I able to get DateCompare to return True for specific dates in the Time dimension?
Test 2 =
DateBetween([Time.Weekly].CurrentHierarchyMember,
[Time.Weekly].[2020].[W23, Jun 05 2020],
[Time.Weekly].[2020].[W25, Jun 19 2020])
Always seems to return false, what am I missing? I am trying to set a calculated measures value based on the date in the time dimension and am running out of ideas
In the DateBetween() function you must use three date values.
[Time].CurrentHierarchyMember is a dimension member, not a date; you transform it to date with function StartDate which retrieves the first date of this Time dimension member.
The same goes for [Time.Weekly].[2020].[W23, Jun 05 2020] and [Time.Weekly].[2020].[W25, Jun 19 2020] - in this case, as you need two particular dates, it is easier to write exact dates.