You have to have Category on the sheet so that the Table Calc can see it. See attached.
I had to set the table calcs so that they take Category into account, and so that they work at the level of Category. Your expected output doesn't have "I" in it. I colored that one black.
That totally works!
Thank you very much.