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
angelaalkatib
Frequent Visitor

Calculating Correct Percentage

Hello-

 

I am new to Power BI and I am stuck on how to calculate the percentage of hours by Department correctly. The current measure I have in place seems to work fine with the percentage of hours by Month, but not by Department.  

 

Here's one Measure that I have created:

GM HRS % = CALCULATE(DIVIDE(SUM('Monthly Hours YTD'[GM Hours]),[Avail_Hours]))

PowerBI Screenshot.PNG

The above screenshot shows one Measure I created that works correctly by Month, but not by Department. For example, the Account Management column should total to 100% or higher vs. 10-11%. I believe the Measure is taking the percent of Account hours by all available hours. 

 

For this chart, I would like to show the percent of Account hours by the total Account hours (not all hours) and all of the other departments. Does that make sense?

 

Here's an example of how the percentages should be calculating. 

Excel Screenshot.PNG

 

Any help would be super appreciated. Thanks!!! 

3 REPLIES 3
Greg_Deckler
Super User
Super User

Have you tried just using your value and then dropping it down and choosing Show As | Percent of Total?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

PctofGrandTotal.PNG

 

Just did that and the calculation is still off (see screenshot). The option is to change the value to "Percent of Grand Total" which may be the problem?

Alright, let's go back to basics then, sample/example data that can be copied and pasted or share your PBIX file and for the sample/exmple data, what is the expected output?

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Also, see this Quick Measure in the Gallery: https://community.powerbi.com/t5/Quick-Measures-Gallery/Percent-of-Total/m-p/163661


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.