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 1 month ago.

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

    bohus.uhrin
    Participant
    • Started: 1
    • Replies: 0
    • Total: 1

    Hello,

    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

     

    #10659

    tomallan
    Keymaster
    • Started: 7
    • Replies: 2517
    • Total: 2524

    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.