Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Trouble understanding how matrix totals work

I turned on the Row Totals feature for a matrix in Power BI desktop. But I don't understand how the totals are being calculated.  Say there are four courses and each course has a certain number enrollment on a given day, then there's a capacity for each course.  I made a measure to get the % Filled -- I divided Enrolled / Capacity.   That works fine.  But when I turned on totals, PBI summed up the % Filled values and then divided it by the number of courses (first snippet below).

 

I need to to sum all capacities, then all enrollments, and then do the division.  Like the second snippet.  That is, for these four courses, the filled rate is 88%, not 86.

 

(Sorry I'm still fairly new to PBI ... but the capacity and enrollment are straight numbers coming from the datasource and I made a measure for %Seats Filled = DIVIDE('Course Reg'[Enrolled],'Course Reg'[Capacity]))

 

   
   
EnrolledCapacity% Filled
16200.8
15200.75
31311
28310.9
  3.45
   
3.45 / 4 = .86 

 

  
  
EnrolledCapacity
1620
1520
3131
2831
90102
  
90 / 102 = .88