Forum Discussion
Calculate Average FTE based on Distinct Employee IDs in Another Column
I’m looking for some help with a measure. I have a table where column A lists Employee ID and column B lists the employee's Full-Time Equivalent (FTE). Each employee is listed in the table multiple times given the nature of the dataset. A sample of the data looks like this:
I need to calculate the total FTE represented in the dataset. Given the FTE can repeat multiple times, it seems the only way to do this is to rely on the average. Looking at the sample dataset shown above, this should result in a total of 7.56 FTE as shown below:
Note: you will see Employee ID 72 has 2 different FTEs listed, 0.60 and 1.00. This is realistic and common as employees can/do change FTE.
In Excel, I am able to land at the correct FTE by first using the UNIQUE formula =UNIQUE(A2:A23) to extract unique Employee IDs. From there I can use an AVERAGEIF formula =AVERAGEIF(A2:A23,E2,B2:B23) to find the FTE per Employee ID. I can then SUM the FTEs to get the total.
I can’t figure out how to create a measure in BI to give me the same result. I have searched high and low and have tried a number of measures suggested to others trying to do a similar calculation however none of the measures I’ve tried give me the FTE I need. The closest measure looked like this:
Total FTE =
SUMX (
SUMMARIZE (Table, Table[Employee ID], Table[FTE] ),
Table[FTE]
)
however, the above measure falls down when you have a scenario like the one with Employee ID 72 who changed FTE. The measure above seems to add the 2 different FTEs together.
If someone could help me, I would greatly appreciate it.
Hi,
Write these 2 measures and drag the second one to the visual
Avg FTE = AVERAGE(Data[FTE])Avg FTE1 = SUMX(VALUES(Data[Employee ID]),[Avg FTE])Hope this helps.
1 Reply
- Ashish_Mathur
Super User
Hi,
Write these 2 measures and drag the second one to the visual
Avg FTE = AVERAGE(Data[FTE])Avg FTE1 = SUMX(VALUES(Data[Employee ID]),[Avg FTE])Hope this helps.