How it works...

The FTEs measure is designed to work at all levels of a date hierarchy, accounting for the fact that there are different numbers of working hours in different months and quarters of the year.

We start by counting the number of full-time employees, __FT. Employees designated as full time are always considered FTEs. We do this by using FILTER to restrict the R05_Table table to just those rows that have the value FT in the Type column. We then use SUMMARIZE to group the rows in that table by the Employee column. This effectively returns a table with distinct values for the Employee column. We can then simply use COUNTROWS to count the number of full-time employees.

Next, we calculate a table variable that contains information on part-time employees, __PT. This table uses FILTER to restrict the R05_Table table to just those rows that have the value PT in the Type column. We then use SUMMARIZE to group the rows in that table by the Employee column. Within this SUMMARIZE function, we add a column called __Hours that contains the SUM of the hours worked by each part-time employee.

We now need to determine the number of working hours within the period in question, __WorkHours. Because the R05_Table table contains multiple rows of the same date, we again use SUMMARIZE to group the rows in the R05_Table table by the Date column. Within this SUMMARIZE function, we add a column called __WorkHours that contains the AVERAGE of the Work Hours column. 

We can use the __PT table variable to determine the total amount of part-time employee hours reported in the period, __TotalPartTimeHours, by using the SUMX function to sum the __Hours column in the __PT table variable. Similarly, we can calculate the total amount of work hours available in the period, __TotalWorkHours, by using the SUMX function to sum the __WorkHours column in the __WorkHours table variable.

Finally, we can return the value for the FTEs measure by dividing __TotalPartTimeHours by __TotalWorkHours. This quotient represents the number of full-time employees that is equivalent to the hours worked by part-time employees. We add this number to the number of full-time employees, __FT, to return the total number of full-time equivalent employees.