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 employee is available or not using calculated column as given below;
Emp 1 = VAR _Check= SELECTEDVALUE(Emp No) VAR _max = SELECTEDVALUE('Date'[Date]) VAR _min = SELECTEDVALUE('Date'[Date]) RETURN IF (_Check= "Emp 1" && _min>=SELECTEDVALUE(Emp[Leave Start]) && _max<=SELECTEDVALUE(Emp[Leave End]),"Leave","Available")
I am getting "Available" on all dates. Let me know what is wrong in above !