Forum Discussion
Sunila
Helper I
1 year agoIdentify Leave Rows with Matching Dates and One Entry Cancelled (0 Hours)
I have a following leave dataset where employees submit leave requests in hours. Sometimes a leave request (e.g., for 4 hours) is later cancelled. In the data, this cancelled entry appears as a separ...
- 1 year ago
Hi Sunila please try this calculated column
IsCancellation =VAR CurrentEmployee = Sheet5[EmployeeID]VAR CurrentDate = Sheet5[LeaveDate]VAR CurrentHrs = Sheet5[Hrs]VAR CurrentStatus = sheet5[Status]RETURNIF (CurrentHrs = 0 && CurrentStatus = "Completed" &&CALCULATE (COUNTROWS (sheet5 ),FILTER (sheet5,sheet5[EmployeeID] = CurrentEmployee &&sheet5[LeaveDate] = CurrentDate &&sheet5[Hrs] >= 1 && Sheet5[Hrs] <= 8)) > 0,"Yes","No")
maruthisp
Super User
1 year agoHi Sunila,
It would be great if you can provide some sample data. Thanks in advance.
/* ===================================================================== */
If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated — thanks!
Best Regards,
Maruthi
LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/
X - Maruthi Siva Prasad - (@MaruthiSP) / X
/* ===================================================================== */