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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rachaelwalker
Resolver III
Resolver III

Formula to show percentages by date

I am struggling with the visuals or possibly the formula. I want to show the percentage of utilization hours and billable hours over 8 hour working day. When reviewing the data by employees, the numbers reflect correctly. However, when I want to see the percentage per day overall, but it is adding all the percentages. Does anyone know how I can accomplish this? See below for screenshots and formula

 

By employee

rachaelwalker_0-1617285711880.png

 

Per day

rachaelwalker_1-1617285745110.png

 

This is the formula I am using in an added column

Utilized % = 
VAR UtilizedHours = 'TimeEntries'[PBi Utilized Hours]
VAR X = UtilizedHours
VAR Y = 8 
RETURN DIVIDE(x,y)

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@rachaelwalker , This seem like a column, You need have a measure

 

example

Utilized % = 
RETURN DIVIDE(sum('TimeEntries'[PBi Utilized Hours]),count('TimeEntries'[PBi Utilized Hours])*8)

or

Utilized % = 
RETURN DIVIDE(sum('TimeEntries'[PBi Utilized Hours]),countrows(summarize('TimeEntries','TimeEntries'[Date],'TimeEntries'[memeberid]))*8)

 

 Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi Rachel,

 

If you want to see percentage utilisation as a percentage of sum of overall hours use 

M_Overall % of total = CALCULATE(SUM('Table'[Overall Hours]),GROUPBY('Table','Table'[Date].[Date],'Table'[Client]))/ CALCULATE(SUM('Table'[Overall Hours]),ALL('Table')).
 
In your expression please replace column by measure.
Anonymous
Not applicable

Hi @rachaelwalker 

 

Your problem stems from the fact that you are aggregating the hours for all the employees visible in the current context but not accounting for this in the denominator where you only divide by 8. For one employee it's OK to divide by 8 but for 10 employees you have to sum up their hours and then divide by... 10 * 8 (this is the so-called nominal total man-hours). Summing up all the hours for the visible employees is called man-hours. So, in a word, what you have to do is to divide your UtilizedHours by 8 * COUNTROWS( 'Employees'), assuming that your model is a correct dimensional model. If you want to get this measure to calculate correctly also when many days are visible in the current context, you have to sum up the hours and divide by 8 * COUNTROWS( 'Employees' ) * COUNTROWS( 'Start Dates' ), again, assuming your model is correct.

amitchandak
Super User
Super User

@rachaelwalker , This seem like a column, You need have a measure

 

example

Utilized % = 
RETURN DIVIDE(sum('TimeEntries'[PBi Utilized Hours]),count('TimeEntries'[PBi Utilized Hours])*8)

or

Utilized % = 
RETURN DIVIDE(sum('TimeEntries'[PBi Utilized Hours]),countrows(summarize('TimeEntries','TimeEntries'[Date],'TimeEntries'[memeberid]))*8)

 

 Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Will this still work with a calculated column? I now need a % based off a calculated column and the calculated column is not appearing for me to select. 

 

 

Calculated column

Utilized Hours = 
  VAR __WorkTypeID = [TimeEntries.workType.id]
  VAR __UtilizationFlag = MAXX(FILTER('WorkTypes',[WorkTypes.id]=__WorkTypeID),[Utilization])
RETURN
  IF(__UtilizationFlag,'TimeEntries'[TimeEntries.actualHours], 0)

I had to remove RETURN but now the numbers are appearing correctly. Thank you so much! 

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.