Fix grand total summaries in pivoting