View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Phrank Phrank is offline
external usenet poster
 
Posts: 153
Default Need a pivot table subset of a pivot table (slicer doesn't work)

Hi,

I know there is a plethora of pivot table and index/match posts, and I
feel I've gotten close to resolving my issue, but no dice so far. I've
got a workbook that is connected to an external dataset. The workbook
is just a pivot table that pulls data from the external dataset. It
shows sales counts for all countries worldwide for all or selected
years. The pivot table is looking at a specific product, with
countries vertically in column B, and the years horizontally in row 4,
and of course with the data counts in the adjacent cells.

I have a second worksheet that has a specific subset of countries for
which I need to return the data from the main pivot table.

I first tried a vba solution with a slicer, programming all the
countries in the subset, but the macro bugged out if it encountered a
country in the subset that wasn't in the main pivot table for the
given device.

I do have a 'GETPIVOTDATA' formula working, and the only problem with
that is it doesn't account for the dynamically expanding/contracting
years that appear in the pivot table.

I also looked at an Index/Match function, but I need the INDEX part to
be a lookup of the year on the second sheet to the year in the main
pivot table.

In a nutshell, it seems I'm trying to overcomplicate this. Any
thoughts on how best/easiest to make a second pivot table that looks
at a subset of countries?

Thanks