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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
4c_em
Regular Visitor

Utilisation by staff - accounting for leavers + joiners + expected hours required to work

Hi Guys

 

I am working on greating a staff utilisation report which looks at;

 

1. actual hours logged vs expect hours as a percentage

2. expected hours to be pro rata if staff leaver or join in that period from;

a) hire date to last day of the month

b) start date to termination date

 

I am coming stuck on point 2, I can share my data if someone wants to have a look. The formula I am using is below

 

Total Expected = if('Timecard Split'[Year-Mon - LDoTM]='Timecard Split'[Year-Mon - Hire Date],CALCULATE(sum('Calendar'[Weekday?]),DATESBETWEEN('Calendar'[Date].[Date],'Timecard Split'[Hire Date],'Timecard Split'[Year-Mon - LDoTM]))*8,if('Timecard Split'[Year-Mon - LDoTM]='Timecard Split'[Year-Mon - Termin. Date],CALCULATE(sum('Calendar'[Weekday?]),DATESBETWEEN('Calendar'[Date].[Date],'Timecard Split'[Start of Month],'Timecard Split'[Termination Date]))*8,IF(AND('Timecard Split'[Year-Mon - LDoTM]<>'Timecard Split'[Year-Mon - Hire Date],'Timecard Split'[Year-Mon - LDoTM]<>'Timecard Split'[Year-Mon - Termin. Date]),'Timecard Split'[ExpectedMonthHOurs])))

 

LDoTM = last day of the month

 

Also let me know if you need anything else to add.

 

Many thanks

Ebrima

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @4c_em,

 

It seems like you calculate available working hours between two date column, I'd like to suggest you to take a look at below link which has similar requirement:

Calculating Working hours

 

Regards,

Xiaoxin Sheng

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

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @4c_em,

 

It seems like you calculate available working hours between two date column, I'd like to suggest you to take a look at below link which has similar requirement:

Calculating Working hours

 

Regards,

Xiaoxin Sheng

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.