Forum Discussion
If a date falls between dates, return a value
Use your table name place of TableName :-
Try this out if you want to return 0 or 1
Final =
VAR _Date = [Date]
VAR Result =
IF(TableName[StartDate] <= _Date && TableName[EndDate] >= _Date , 1, 0)
)
RETURN
ResultIf you want to return FY value :-
Final =
VAR _Date = [Date]
VAR Result =
IF(TableName[StartDate] <= _Date && TableName[EndDate] >= _Date , TableName[FY])
)
RETURN
Result
Thanks,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
It isn't giving me an option to refer to another table for the start and end date range to return FY. I need it to look at the "Date Onboard" column and if that date is between 10/1/2021 and 10/1/2022, return FY22, if not return "". OR it can look at the seperate table I pasted above and return the FY if the "Date Onboard" is in the listed ranges on that other table.