Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Subtotals in PowerPivot Table

$
0
0

I have a pivot table based on data with the following fields.

OfficeName, Year, Worktype, Dollars, Hours

I've built the pivot with the following items in each area.

COLUMNS: Worktype

ROWS: OfficeName, Year

VALUES: Dollars, Hours

This gives me the following layout.

                    Compliance Work         Consulting Work

Perth        2012   $1000    50           $400        10

                2014   $1200    60           $600        15

Adelaide    2012   $800      40           $100        2

                2014   $1000     50          $200         3

And so on for 30 offices.

The problem I have is that I want to subtotal the Dollars and Hours columns by Year. In other words I want to see a total row at the bottom of the pivot table showing total for 2012 and total for 2014 as show here.

Total         2012    $1800   90           $500         12

                2014     $2200  110         $800         18

I haven't been able to work out how to do this using the UI. I can write code that will add rows below the pivot table and insert formulae to create the totals, but I can't find a way to do it using the UI.

I need to have a method I can show my "superiors" so they can play what-if with the report. It's only showing two years at the moment as per above, but they need to be able to choose whatever years they want and get sub-totals for them at the bottom.

Can some tell me how to tell Power Pivot to subtotal in this way.

Thanks

Gordon


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>