Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
mlsx4
Super User
Super User

Struggling with summarize, calculate, sumx to calculate Daily FTE calculation

Hello everyone,

 

I'm stuck at calculating FTE per employee in Power BI. Let me show you some examples of my tables.

 

Firstly, I have a table with all the information about the contract (number of hours per week, starting and ending date, etc. and also the center this employee belongs to).  Just to mention here, that an employee can appear several times with different kind of contracts.

mlsx4_5-1687516348514.png

 

On the other hand, I have the absences table

mlsx4_3-1687516000908.png

 

Additionally, I have another table with all the centers and companies of the group.

 

mlsx4_4-1687516169974.png

 

Then, my problem is that I need to calculate the daily FTE for each employee, taking into several things: the kind of contract which is active at the moment, if the employee is in the absences table, the center they belong... Imagine, we want to calculate it for May. Day 1 both will be active so I will have a ratio of 0.75+1=1.75. Day 2, Employee 2 is on holidays so it will be 0+1=1, and so on...

I have tried to do an approach by calculating the % regarding the contract first. And then having a kind of multiplier by 0 when an employee is on holidays, and another multiplier by 0 when an employee has finished the contract. The first part is working properly, but the multipliers aren't. These are my measures for holidays or absences:

 

mlsx4_6-1687516915403.png

And for the multiplier:

mlsx4_7-1687517014030.png

The problem is that BajasD never returns 1-> it adds all the leaves. Therefore, even if the employee isn't in the company for a day it will always multiplies by 1 because the condition will compare with the total.

I'm pretty sure it is because I need to filter or summarize something, but I don't know what I need to do. It is a really low granularity (company->center->year->month->day->employee).

 

Hope someone could help me.

Thank you in advance

 

 

 

 

 

 

1 ACCEPTED SOLUTION

UPDATE: I have just added a calculate in the multiplier and now, it's working perfectly

 

Thank you for your response, but start/end date is not what I'm really struggling with. 

The thing is that if I don't try to get a multiplier (which I need), BajasD is working for each day, for each worker. However, when I try to do the multiplier always aggregates the measure BajasD. So, if I have 6 workers on a leave because of an accident, instead of comparing one by one for this day, it will compare to 6. Therefore, it will never be 0.

 

An example.

Employee 1- > misses from 1st June to 4th of June

Employee 2-> misses from 2nd June to 3rd of June

Then if I try to make the multiplier:

Day 1: employee 1 must be 0, employee 2 must be 1

Day 2: employee 1 must be 0, employee 2 must be 0

 

However multiplier will return always 1 since it will count 2 (number of workers out).

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @mlsx4,

It seems like a common analysis requirement from date range that defined by multiple fields. You can look the following blog start date, end date part if it helps:

Before You Post, Read This: start, end date 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

UPDATE: I have just added a calculate in the multiplier and now, it's working perfectly

 

Thank you for your response, but start/end date is not what I'm really struggling with. 

The thing is that if I don't try to get a multiplier (which I need), BajasD is working for each day, for each worker. However, when I try to do the multiplier always aggregates the measure BajasD. So, if I have 6 workers on a leave because of an accident, instead of comparing one by one for this day, it will compare to 6. Therefore, it will never be 0.

 

An example.

Employee 1- > misses from 1st June to 4th of June

Employee 2-> misses from 2nd June to 3rd of June

Then if I try to make the multiplier:

Day 1: employee 1 must be 0, employee 2 must be 1

Day 2: employee 1 must be 0, employee 2 must be 0

 

However multiplier will return always 1 since it will count 2 (number of workers out).

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.