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

Values from measure in table incorrect but total is correct

I've searched for hours and hours and I've seen tons of threads with people complaining about the measure totals being incorrect. However, my issue is that the total is correct in my case but the values in the table are incorrect. 

 

I'm attempting to create a timecard helper. The user will use a parameter to enter a total number of hours and use slicers to generate a list of budget codes to use and how much time should be entered. I have a spreadsheet which contains a list of rooms with a list of budgets associated with the rooms. Some budgets will be used in multiple rooms.

 

Each room has a list of budgets and each budget is assigned a certain burden/percentage which is used to calculate how time should be split between each budget. The problem I'm having is that my calculation for "hour value divided by facilitycount x calculated burden" is being calculated properly which can be seen in the image below. However, you'll notice that the values above the total don't appear to add up. It appears that my "burden" calculation is wrong. It appears that the calculated burden is displaying the calculated value per room. However, I would like to spread the burden across all selected rooms in order to distribute the entered time properly. Please see my dax code below for more context. I'm attempting to divide "burden" by the sum of "budgetcount". I assumed that this would take any filters into account and change the "calculated burden" but the calculated burden doesn't change. What is the best way to accomplish this?

 

pbi-help.PNG

This calculation divides the burden by the total number of budgets but it doesnt' appear to work. I think this is my issue.

Calculated Burden =

DIVIDE(SUM([Burden]), [budgetCount])
 
This calculation is taking the hours entered and supposedly displaying how time should be split accross budgets. 
Hour_Value_divided_by_Count_of_IS_divided_by_FacilityCountDistinct_x_Sum_of_Burden =
[Hour Value divided by Count of IS divided by FacilityCountDistinct] * SUM('Table'[Burden])
1 ACCEPTED SOLUTION
cphughes
Frequent Visitor

I figured it out. I needed to use "CALCULATED" with the "ALLSELECTED" filter.
calculation = SUM(Table1[Burden]) / CALCULATE(DISTINCTCOUNT([Room]),ALLSELECTED())

View solution in original post

3 REPLIES 3
cphughes
Frequent Visitor

I figured it out. I needed to use "CALCULATED" with the "ALLSELECTED" filter.
calculation = SUM(Table1[Burden]) / CALCULATE(DISTINCTCOUNT([Room]),ALLSELECTED())

amitchandak
Super User
Super User

@cphughes , In place of Column 1 and column2, use the columns used in visual and try to have measure like this to get row sum

 

Hour_Value_divided_by_Count_of_IS_divided_by_FacilityCountDistinct_x_Sum_of_Burden =
Sumx(summarize(Table, Table[COlumn1], Table[Column2], "_1", calculate(
[Hour Value divided by Count of IS divided by FacilityCountDistinct] * SUM('Table'[Burden]))), [_1])

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 thanks for your response. I'm not sure what you mean by column1 and column2. Let me make this a little clearer.

 

Below is table1 which contains Room, Budget code, and burden. Notice each room has 1 or more budgets assigned to it and the burden is split between budgets with a total burden of 100%.

table1.PNG

 

In the table below you'll notice I've combined all of the budgets and created a percentage split which was created using an average. "Final Hours" should be "Hours Entered" divided by "Percentage Split". When the user enters their hours (10 hours in this case) there will be a separate visual which will show all of the budgets used, the percentage split, and the breakdown of the hours split up accordingly (final hours). The two calculations I'm having a hard time trying to display in the visual are "percentage split" and "Final Hours". Please see table2 below.

table2.PNG

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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