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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
GlynMThomas
Resolver I
Resolver I

Total Incorrect When Using Multiple Columns

Hi,

 

I have this model setup.

 

GlynMThomas_0-1663949296243.png

 

I have this measure:

 

Admin Estimate Days =
(SUM('WorkTimeData'[Days]) - SUM('Holidays'[Holiday Duration (Days)]) - SUM(Absence[Sick Duration (Days)])) * SUM('Name mapping'[Admin pc])
 
Because the Admin PC column is a fraction this means the total is incorrect in my table:
 
GlynMThomas_1-1663949451925.png

 

I would normally use a column to do this calc and then it would automatically do that calculation first then sum the values up like I want it to. But power bi won't allow me to pull the other columns into one place using RELATED unless it's in a measure which means the calc happens after the aggregation giving me an incorrect total.

 

How would I perform the caculation first before the aggregation?

1 ACCEPTED SOLUTION

Thanks, that kind of worked but introduced some other issues in the aggregation. I managed to solve it in the end with a summarised table combining all the values and aggregating them into 1 row.

View solution in original post

2 REPLIES 2
jgeddes
Super User
Super User

Try this calculated column in the Name mapping table

Calculated Column =
var _holidayDays =
CALCULATE(
    SUM(Holidays[Holiday Duration (Days)]),
    FILTER(Holidays, Holidays[Holiday PeopleHR Name] = Name mapping[PeopleHR Name])
)
var _absenceDays =
CALCULATE(
    SUM(Absence[Sick Duration (Days)]),
    FILTER(Absence, Absence[Absence PeopleHR Name] = Name mapping[PeopleHR Name])
)
var _workDays =
CALCULATE(
    SUM(WorkTimeData[Days]),
    FILTER(WorkTimeData, WorkTimeData[Name] = Name mapping[PeopleHR Name])
)
return
( _workDays - _holidayDays - _absenceDays) * nameTable[admin pc]




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Thanks, that kind of worked but introduced some other issues in the aggregation. I managed to solve it in the end with a summarised table combining all the values and aggregating them into 1 row.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.