Q:

How to display subtotals for a main and sub category of a PivotTable? 

I have the following data:

I want to calculate the occurrence of each color for a given shape. 
Using PivotTables, I got this:

However, this is the output I want:

How do I achieve this in Excel?  Is this possible using a PivotTable? 
Thanks! 

A:

Solution: Yes, it is. 
(1) Structure your selected fields like this:

(2) Right click "Shape" in Row Labels and in the "Layout & Print" tab, select "Show item labels in tabular form". 

Result:

