Forum Discussion
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]))
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.
Any help would be super appreciated. Thanks!!!
3 Replies
- Greg_DecklerCommunity Champion
Have you tried just using your value and then dropping it down and choosing Show As | Percent of Total?
- AnonymousNot applicable
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?
- Greg_DecklerCommunity Champion
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