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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Allocate percentage of total

Hello,

 

I am trying to build a report of Team Leads, Employees, Employee hours entered, and overtime hours.  I would like the overtime hours to allocate to each Team Lead the Employee worked for based on the percentage of total hours.  For example:

 

Charles worked a total of 69 hours.  17 hours were for Joe, and 52 hours were for Sue.  He had 29 hours of overtime (69-40).  His overtime will be multipled by 1.5 to correspond to overtime pay.  24.6% of his overtime would allocate to Joe, and 75.4% of his overtime would allocate to Sue.

 

Any ideas how to make this work?  I would like it to ultimately look like this:

 

OT allocation.JPG

 

Thanks!

1 ACCEPTED SOLUTION

I added another employee to make sure things worked and also took a snip of my data model so you could see that too.  I also seperated the measures into a seperate table so the solution is cleaner and then combined some of the calculations into one so that you could see that too.

 

OTDAX_Model.pngOTDAX2.png

 

 

Hope this helps!

Dawn Thompson

 

PS:  If this solution works, please mark it as a solution to help others. Kudos are nice too.

View solution in original post

3 REPLIES 3
dethompson97
Resolver III
Resolver III

I am also new to DAX and learning and took this on as a challenge.  I entered your data into an Employee Hours table and tried to do what  you were looking for.  I hope this helps point you in the right direction.

 

 

 

OTDAX.png

 

Hope this helps!

Dawn Thompson

 

PS:  If this solution works, please mark it as a solution to help others. Kudos are nice too.

I added another employee to make sure things worked and also took a snip of my data model so you could see that too.  I also seperated the measures into a seperate table so the solution is cleaner and then combined some of the calculations into one so that you could see that too.

 

OTDAX_Model.pngOTDAX2.png

 

 

Hope this helps!

Dawn Thompson

 

PS:  If this solution works, please mark it as a solution to help others. Kudos are nice too.

Anonymous
Not applicable

@dethompson97  You say you're new to this, but to have worked this out - and so quickly - I think you're further along than you give yourself credit for!  I tried it with some sample data and it worked perfectly!  My actual data will have many other factors that I will work into the calculations, but you gave me the push I needed... thank you!

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors