See attached workbook for a solution. The important part, as you correctly pointed out, is to partition a table calculation in two ways at the same time. To do this, you feed the results of one table calc to another, and then partition the latter using the selector, as shown below.
Fantastic. Exactly what I was looking for. Thank you very much for your help.