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
tierrak
New Member

Calculation of Overtime Average

Hello,

 

I have Column A that has types of Hours Worked, (Regular, Overtime, PTO) and Column B that has the total number (55, 15, 8 10). I need to figure out the average amout of Overtime worked divided by the total hours worked. Let me know if the questions is clear.

 

Column A    Column B

Regular          40

PTO               32

Overtime       16

Overtime        32

Regular         8

PTO             40

PTO             40

Regular        40

Overtime      24

PTO             4

Regular       36

 

Basically, how do I get the "Card" option to display 23%?

1 ACCEPTED SOLUTION
dedelman_clng
Community Champion
Community Champion

 

I don't think you mean average.  To get 23% you want the total OT divided by the total of all hours

 

MeasureA =
DIVIDE (
    CALCULATE ( SUM ( OT[Column B] ), OT[Column A] = "Overtime" ),
    CALCULATE ( SUM ( OT[Column B] ) ),
    0
)


Hope this helps

David

View solution in original post

3 REPLIES 3
dedelman_clng
Community Champion
Community Champion

 

I don't think you mean average.  To get 23% you want the total OT divided by the total of all hours

 

MeasureA =
DIVIDE (
    CALCULATE ( SUM ( OT[Column B] ), OT[Column A] = "Overtime" ),
    CALCULATE ( SUM ( OT[Column B] ) ),
    0
)


Hope this helps

David

Thank you so much!!!

tierrak
New Member

Basically, how do I get the "Card" option to display 23%?

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.