Man, I’m going to have to hire you as a plant to sit in the audience of my webinars and feed me all the right questions. I’ve got a video on THAT question coming at the beginning of this week.
The answer is that in calculating totals, DAX does so line by line not relative to the column of numbers above it. So in this case, it gets to the total line, doesn’t find any names in the evaluation context and thus all the dummy variables evaluate to zero (i.e., false). In order to force the total to calculate correctly you need to incorporate some additional logic using virtual tables to force the the total to sum the column of numbers above it. All explained in detail in the coming video, or you can go to @greg’s excellent DAX Patterns section of the forum focused on fixing incorrect totals:
Learning to use variables properly is one of the most important techniques in DAX. There are a whole bunch of excellent Enterprise DNA videos focused on this topic – here’s a list:
https://forum.enterprisedna.co/search?expanded=true&q=%23enterprise-dna-online%20variables
I hope this is helpful.
– Brian