cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
95Bigbluetoy
Helper I
Helper I

Calculate percentage of Job Cost hours and Overhead hours

Power Bi table.PNG

 

I am new to power bi and need some help calculating JC hrs and OH hrs. I have filtered my data and have added calculated columns for Total Hours, JC hrs and OH hrs. As you can see in my matix table above, the Total hrs column shows the total hrs for all cost centers for each employee (each row) and a column total. The JC hrs column shows the total hrs for certain cost centers for each employee (row) and column total and the OH hrs column shows the total hrs for each employee (row) for certain cost centers and the column total hrs. I need to show the % of JC hrs and % OH hrs for each employee (row) and percentage of total hrs (column) based on their total hrs. I tried the formula


% JC Hrs = DIVIDE( SUM(TC_History[Job Cost Hrs]), SUM(TC_History[Total Hrs] )) but as you can see, it does not return the correct values. The first employee should show 1 (100%) % JC hrs but is showing as 31.05.
 
All help is greatly appreciated.

 

 

 

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @95Bigbluetoy ,

Did you calculate the values of % JC Hrs using a calculated  column? If so, you need to create a measure. Then the formula is working. 

1.PNG

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xuding-msft
Community Support
Community Support

Hi @95Bigbluetoy ,

Did you calculate the values of % JC Hrs using a calculated  column? If so, you need to create a measure. Then the formula is working. 

1.PNG

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Yes I did. thanks for your help. I created the measure and it is working now. Being new to this, a bit confused as to what to use when.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.