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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
scott3387
Frequent Visitor

Calculate % of shifts filled by department by day

Hello,

 

Sorry this is probably really easy but I'm trying to produce a table for management so they can see departments that are understaffed in advance. I have two tables and two lookups (Examples below).

 

  • Filled - Rows contain one assignement aka one person working in one unit for say 8 hours.
  • Unfilled - Rows contain shifts without someone assigned (generally due to sickness or annual leave)
  • LUs are just heirarchies

 

I thought the calculation 

 

(sum('Filled Duties'[Actual Work])/(sum('Filled Duties'[Actual Work])+sum('Unfilled Duties'[Work Time])))
 
would work but sadly not. Also being a measure it removes the ability to drill down into the data which I would like to keep.
 
What is the best way to accomplish this?
 
Thanks in advance
 
Filled           
Assignment InfoOwning UnitPersonDuty DateActual WorkShiftCost CentreFulfilment TypeShift TypeAssignment NoGrade 
Joe Bloggs - E on 18/04/2020 in Ward 21 (TW)Ward 21 (TW)Joe Bloggs18 April 20207.5Early (E)Ward 21 (TW)AgencyDay Band 5 RN 
            
UnFilled           
Valid DateOwning UnitShift TypePlanned Start DatePlanned End DateStart TimeEnd TimeWork TimeRest TimeGradeGrade TypeGrade Type Category
11-May-20Clinical Admin Unit - Head and Neck Day11/05/2020 09:0011/05/2020 17:00  7.50.5A&CA&C-
            
            
LU Unit           
Healthroster UnitCost CentreOrg L2Org L3Site       
Chief Executive AA102TestCorporate and SupportTest       
            
LU Grade           
GradeStaff GroupSecondary Grade         
A&CAdministrative and ClericalA&C         

 

1 REPLY 1
v-eachen-msft
Community Support
Community Support

Hi @scott3387 ,

 

Do the "Filled" and "Unfilled" tables have a relationship?

According to the sample data, the calculated result is just a percentage value.

You could show the expected result here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.