Forum Discussion
Anil59060
5 years agoFrequent Visitor
Absent / Present based on date range
I have 10 employees in my Dept. Each one submits his leave plan begining of a year which includes Emp No, Leave Start and Leave end dates (Emp Table). I want to see on a selected date if a particular...
stevedep
Memorable Member
5 years agoHi,
Below works;
__Available =
var _selDate = SELECTEDVALUE('Date'[Date])
return
if (
COUNTROWS(FILTER('Emp Table', 'Emp Table'[Leave Start] >= _selDate && _selDate <= 'Emp Table'[Leave End] )) > 0 , "Not Available", "Available")
As seen here:
Please note the data model and the helper columns to join, value is 1 in both.
Please mark as solution if so. Thumps up for the effort is appreciated.
Kind regards,
Steve.