Hello,
I am trying to calculate a certain visual and I have been struggling with a similar case so I was wondering if somebody would be able to help me figure out the issue here. I have created a sample.
I have the tEmployee table,
The totals days is calculated based on the start and end date and the tDate(calendar) table.
I have another table, the t_Employee_Attendance,
The Personal Leave and Vacation Column is calculated as below:
Personal Leave & Vacation = IF(t_Employee_Attendance[Reason] = “Personal Leave” || t_Employee_Attendance[Reason] = “Vacation”, t_Employee_Attendance[EmpID], BLANK())
Illness is calculated as,
Illness = IF(t_Employee_Attendance[Reason] = “Illness”, t_Employee_Attendance[EmpID], BLANK())
And Days Absent is calculated as,
Days Absent =
CALCULATE(
COUNTROWS(tDate),
DATESBETWEEN(tDate[Date],
t_Employee_Attendance[Absent From],
t_Employee_Attendance[Absent To]),
tDate[Count] = 1,
ALLSELECTED(‘t_Employee_Attendance’))
Afterwards, I created a measure to calculate sums of days absent for each employee with a personal leave or vacation,
Days Absent(PL/VAC) = CALCULATE(SUM(t_Employee_Attendance[Days Absent]),FILTER(t_Employee_Attendance,t_Employee_Attendance[Reason] = “Personal Leave” || t_Employee_Attendance[Reason] = “Vacation”))
I am trying to currently create another measure that would count the employee is they have taken off more than 10 days overall but it does not seem to be accurate. So, I thought of breaking it down in a table to see where the issue might be in and it turns out that it does not even take that employee in the count as the image below.
Can somebody please let me know if there is something I might not be doing accurately here? I am posting the sample file here. Thank you.Employee greater than 10(PLVAC).pbix (161.4 KB)