Show value based on the date range

Hi
I need to create a measure that would show a value based on conditions of dates.
I’m pretty new to the EAZY BI and would appreciate your help.

If one of my dimension which is a date falls between certain dates then a specific value shows.

I struggle with conditions.

If anyone has already done something like that, maybe could share.

Thanks a lot
Malgorzata

Hi @m.piotrowska

I believe we solved your case directly via eazyBI support channel.

A short summary of the solution:

In this scenario I recommend using CASE statement together with DateBetween function, where “Custom Date field” should be replaced with the date that needs to fall between specific time period which I have indicated as Jan 1, 2023 and Jan 31, 2023 for example purposes. And “Value to return” must be replaced with the necessary value or text that needs to be returned when the “Custom Date field” falls between the indicated time period.

CASE
WHEN
DateBetween([Measures].[Custom Date field],
"Jan 1, 2023","Jan 31, 2023")
THEN
"Value to return"
END

Best wishes,
Elita from support@eazyBI.com

1 Like

Thanks a lot! It was very helpful.
Best
Malgorzata

1 Like