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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

DAX Help - Dividing

I need to create a measure called Utilization Rate that shows the sum of person hours divided by working hours with the output per person.

 

Utilization Rate = divide((sum('Report1'[PersonHours])),SUM('Report2'[Working Hours])) gives me the company-wide number
 
Utilization Rate = divide((sum('Report1'[PersonHours])),MAX('Report2'[Working Hours])) divides everyone by 40 hours, but not everyone works 40 hours.
 
How do I write this if neither SUM nor MAX work?
 
 
Report1
NamePerson Hours
Anthony8
Anthony12
Anthony8
Cassie16

 

Report2

NameWorking Hours
Anthony40
Cassie16

 

For Anthony, this should appear as (8+12+8)/40 = .7

For Cassie, this should appear as (16)/16 = 1

 

When I use "SUM", Cassie appears as (16)/56 = .28

When I use "MAX", Cassie appears as (16)/40 = .4

Neither are correct

 

Thanks

1 ACCEPTED SOLUTION
Sahir_Maharaj
Super User
Super User

Hello @Anonymous,

 

You can use the AVERAGEX function to iterate over each person in the Report1 table and divide their total person hours by their respective working hours from Report2.

 

Utilization Rate = 
AVERAGEX(
    VALUES(Report1[Name]), 
    DIVIDE(
        SUM(Report1[Person Hours]), 
        LOOKUPVALUE(Report2[Working Hours], Report2[Name], Report1[Name])
    )
)

 

Using this formula, the utilization rate for Anthony would be (8+12+8)/40 = 0.7, and the utilization rate for Cassie would be 16/16 = 1, which matches your desired results.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

View solution in original post

3 REPLIES 3
sevenhills
Super User
Super User

I will do this way ... 

Util Rate = 
var _h =   sum (Table_Actuals[Person hours])  
var _wh = CALCULATE( sum(Table_Alloted[Working Hours]), 
Filter(Table_Alloted, Table_Alloted[Name] in  VALUES(Table_Actuals[Name])))

return  DIVIDE(_h, _wh ) 

 

Format the data type as decimal number.

Sahir_Maharaj
Super User
Super User

Hello @Anonymous,

 

You can use the AVERAGEX function to iterate over each person in the Report1 table and divide their total person hours by their respective working hours from Report2.

 

Utilization Rate = 
AVERAGEX(
    VALUES(Report1[Name]), 
    DIVIDE(
        SUM(Report1[Person Hours]), 
        LOOKUPVALUE(Report2[Working Hours], Report2[Name], Report1[Name])
    )
)

 

Using this formula, the utilization rate for Anthony would be (8+12+8)/40 = 0.7, and the utilization rate for Cassie would be 16/16 = 1, which matches your desired results.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning
ToddChitt
Super User
Super User

Is there come relationship between these two reports? Ideally, they should both be joined to an Employee dimension on a one to many relationship. Then, break out the DIVIDE by asking yourself: What is the Numerator for this? Create a MEASURE for that. What is the Denominator? Create a MEASURE for that. Ideally the Numerator would probably be in Report 1 and the Denominator would be in Report 2. 

 

Add a table visual and add the person from the Employee dimension, and the two base measures or Numerator and Denominator. Make sure those two measure are reporting correct numbers.

 

Finally, create the DAX Measure in the Employee table using the DIVIDE functin, but using the Measures.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.