I have a Data Source that is added to my data model.
I have a Pivot Table named "AssignedTable" and a Field named "CustomerSalespersonName"
I have a list of Sales Reps in a named range "AccountManagers"
I am trying to filter the Pivot Table based on the list.
I tried the above but it gave me a 1004 error telling me one of the objects doesn't exist. I assume this may be related to using Data Model so I tried replacing my field name as per below
But now I get error 438 Object doesn't support this property or measure on this line
With Worksheets("Assigned").PivotTables("AssignedTable").PivotFields([SalesData].[CustomerSalespersonName].[CustomerSalespersonName])
Any ideas?
Bookmarks