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
JayPow28
Helper I
Helper I

Dividing a fixed number by a calculated number

Hi,

 

I have table with a number of columns, one is a list of employee names and another is a list of the hours those employees are contracted to per week, for example John Doe 40 Hours.

I also have a column in another table that is summing up the total billable hours for the employees each week.

In my report I can see the employee name, normal work hours and what has been billable for that week,

John 40 (Hrs) 32.5 (billable)

I want to divide the billable time by the weekly hrs to get a percent billable based on their contracted hours.

How can I do that?

Most examples I see try to SUM the work hours, but I don't need that.

 

Regards,

Jason

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @JayPow28 ,

 

Without seeing your data it's a bit more difficult, but I guess it would be a measure something like this:

_yourMeasure =
DIVIDE(
  SUM(tableA[billable]),
  MAX(tableB[contractHours]),
  0
)

 

This assumes that tableA and tableB are related via a common dimension (probably employee) that is used in your visuals.

 

Pete 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
BA_Pete
Super User
Super User

Hi @JayPow28 ,

 

Without seeing your data it's a bit more difficult, but I guess it would be a measure something like this:

_yourMeasure =
DIVIDE(
  SUM(tableA[billable]),
  MAX(tableB[contractHours]),
  0
)

 

This assumes that tableA and tableB are related via a common dimension (probably employee) that is used in your visuals.

 

Pete 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Briliant, thanks Pete.

That worked!

 

Much appreciated,

Jason

No problem Jason. Happy it worked for you 🙂



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thanks Pete, that looks exactly like I was looking for.

It was the MAX function I was missing.

I'll try it out later and let you know, thanks for the help.

 

Jason

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.