This image shows a pivot table of sales and profit by product sub category with conditional formatting applied to subtotals and the grand total.