Forum Discussion
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]))
| Enrolled | Capacity | % Filled |
| 16 | 20 | 0.8 |
| 15 | 20 | 0.75 |
| 31 | 31 | 1 |
| 28 | 31 | 0.9 |
| 3.45 | ||
| 3.45 / 4 = .86 |
| Enrolled | Capacity |
| 16 | 20 |
| 15 | 20 |
| 31 | 31 |
| 28 | 31 |
| 90 | 102 |
| 90 / 102 = .88 |
Please see this video for how to get your expected total.
(2) Power BI - Tales from the front #01 - Getting the Right Total - YouTube
Pat
2 Replies
- mahoneypat
Microsoft Employee
Please see this video for how to get your expected total.
(2) Power BI - Tales from the front #01 - Getting the Right Total - YouTube
Pat
- AnonymousNot applicable
Thanks, I had seen this information on some tutorials and never knew what they were talking about. I get it now -- created a SUMX measure and now my totals look right.