Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I am trying to write the following formula with the following tables
Numerator should be the (Sum of Total Person Hours) - (Sum of Total Person Hours where Hour Type equals Non-Working)
Denominator should be the (Sum of Total Working Hours).
Using this example, the formula should be (40-24) / (40) = 0.4
How can I write this formula as a column or measure?
Table: Time Logged
| Resource Name | Person Hours | Hour Type |
| Jill | 8 | Client |
| Jill | 8 | Internal |
| Jill | 24 | Non-Working |
Table: Resources
| Resource Name | Working Hours |
| Jill | 40 |
or you can plot the Resource Name from Resource table with a measure like:
Measure =
VAR _nonworkinghours=
SUMX(
FILTER(
TimeLogged,
TimeLogged[Resource Name] = MAX([Resource Name])
&&TimeLogged[Hour Type] = "Non-Working"
),
TimeLogged[Person Hours]
)
RETURN
DIVIDE( MAX([Working Hours]) - _nonworkinghours, MAX([Working Hours]))
it worked like:
hi @Anonymous
try to add a column in the Resource table:
column =
VAR _nonworkinghours=
SUMX(
FILTER(
TimeLogged,
TimeLogged[Resource Name] = [Resource Name]
&&TimeLogged[Hour Type] = "Non-Working"
),
TimeLogged[Person Hours]
)
RETURN
DIVIDE( [Working Hours] - _nonworkinghours, [Working Hours])
it worked like:
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 54 | |
| 43 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 123 | |
| 107 | |
| 44 | |
| 32 | |
| 24 |