Forum Discussion
IBrant
3 years agoFrequent Visitor
If a date falls between dates, return a value
I'm new to Power BI and I'm struggling with what seems like a simple task. I need to sort dates by fiscal year. I've tried to do this a couple different ways. 1. I tried making a differnt column fo...
pratyashasamal
3 years agoMemorable Member
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
IBrant
3 years agoFrequent Visitor
This is my table: