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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
bcap01
Helper II
Helper II

DAX Calculation Not Working

I would like to combine the value of (2) fields to determine percetage of Billable hours.

 

For example, what I would like to do is this:  ChargeableHours/(ChargeableHours+NonChargableHours) or 158/(158+322) = 32.91%.

 

Here is my DAX:

P% = (table[ChargeHours])/(table[TotalHours])
 
For some reason I am getting a different percentage than expected.  What adjustment do I need to make this work?

 

 

5 REPLIES 5
bcap01
Helper II
Helper II

Thanks again @FreemanZ ,

 

For some reason the Matrix is still accuminating instead of doing the calculation.  Perhaps do I need to do CALCULATE somewhere?

 

BI_Util2.png

hi @bcap01 

could you share some raw dataset?

bcap01
Helper II
Helper II

@FreemanZ 

 

Many thanks for your reply!  Below is what my data looks like.  What seems to be happening is the UTil% column is accuminating/adding instead of doing the desired calculation of ChargeHours/TotalHours.

 

TotalHours is a column I made which is:  ChargeHours + NonCHargeHours. 

ChargeHours and NonChargeHours are fields from the database table I am importing.

 

BI_Util.png

Many help is greatly appreciated!

hi @bcap01 

try like:

Util% =
DIVIDE(
    SUM(TableName[ChargeHours]),
    SUM(TableName[TotalHours])
)

 

FreemanZ
Super User
Super User

hi @bcap01 

 

is P% a calculated column or measure? please consider provide some sample data to well reflect your case. 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.