# compare counts from two pivot tables



## jwoodsford (May 30, 2012)

I have two pivot tables with the same headers. The data is a count by site, by month.
I have to compare the two tables and show the differences between the counts, either + or -, in another area in the spreadsheet.
Problem is that table one has a column of sites from 100-206. The second table only show sites that have data in the row so there might be 100-107, 109, 122, etc.
How do i complare the data(counts) from ONLY the sites where the data matches and show the data from table 1 where there is no site in table 2?

ex.table one
site                  count
101                    300
102                    200
103                    100
104                     50
107                    450
121                    550
155                    650
ex. table two
site                  count
101                    250
107                    500
121                    600
155                    700

output from comparison ex. 
site                   count
101                    50
102                   200
103                   100
104                    50
107                    50
121                    50
155                    50


----------



## ruve1k (May 30, 2012)

Create a single-column table that has all of the sites.
The create relationships from that column to each of the Site columns in the other tables. Then create measures for the counts in each table. Then create a measure that subtracts one from the other. Put the new all-encompassing Site column into the pivot table along with the other measures and you should be good to go.


----------



## jwoodsford (May 30, 2012)

thanks for the post ruve1k but I will need some elaboration on what you are saying. I understand relationships but do not know how to create relationships between both the tables. You also state "create measures ...." What measures are you talking about. 
Can you give examples.

thanks


----------



## ruve1k (May 30, 2012)

You posted your question in a PowerPivot-specific forum. 
Are you at all familiar with PowerPivot?


----------



## jwoodsford (May 31, 2012)

No i am not. I am limited to excel 2010


----------



## ruve1k (May 31, 2012)

PowerPivot is an add-in for Excel 2010.


----------



## jwoodsford (May 31, 2012)

Ok thanks
I will give it a try and see what happens


----------

