Generate a new measure based on the dates

Hi
I would like to create a measure for my report that would populate a certain text based on the condition.
I want to check if a certain field (measure) falls between two dates and if it does, the measure will show a “text”.

Please direct me to the documentation or help to create such a measure.

Thanks a lot
Malgorzata

Hi @m.piotrowska,

Welcome to the eazyBI community!

​You might use the CASE statement ​and function DateBetween() to build a construction that checks the date being within a defined interval and returns the result.

CASE WHEN
 DateBetween(
--date to be checked
 [Measures].[Issue created date],
--start of time interval
 [Sprint].CurrentHierarchyMember.Get('Start date'),
--end of time interval
 [Sprint].CurrentHierarchyMember.Get('End date')
 )
THEN
--the text to return in case of success
 "created during sprint"
END

You might read about the used building blocks here.
CASE
​DateBetween()

​Regards,
​Oskars / support@eazyBI.com

1 Like

Thanks
The other solution provided worked. I don’t have in this cube Start Dates nor End Dates.

Best,
Malgorzata

Hi

Actually, I would like to go back on this as someone may have happened to come across such a thing.
The measure that was created should be copied to a dimension.
So the values calculated based would be displayed as members of dimension.
Is it possible at all? To calculate dimension members this way? Or copy a value from measure to a dimension member?

Thanks for any suggestions.
Malgorzata