Home Forums Power Pivot Using VBA to filter Pivot Table from PowerPivot

This topic contains 1 reply, has 2 voices, and was last updated by  tomallan 8 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #10655

    • Started: 1
    • Replies: 0
    • Total: 1


    I recorded macro which should clear filter in my pivot table based on power pivot datamodel.

    It looks like this, however, it doesnt work, could anyone help?

    ActiveSheet.PivotTables(“PivotTable7”).PivotFields(“[Database].[Employee name].[Employee name]”).ClearAllFilters



    • Started: 7
    • Replies: 2554
    • Total: 2561

    I see no reason why it would not work, given the information (your data model has a table called Database and a field called Employee name)

    Is the anticipated sheet truly the active sheet?

    Have you stepped through your VBA code and made sure the line of code has executed?

    Is there any code that subsequently executes and restores the filter?

    For additional help, please put up an example workbook with pivot and VBA code.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.