+ Reply to Thread
Results 1 to 2 of 2

Filter Pivot Table Generated From PowerQuery Data Model

  1. #1
    Registered User
    Join Date
    06-12-2014
    MS-Off Ver
    Microsoft 365 Enterprise
    Posts
    5

    Filter Pivot Table Generated From PowerQuery Data Model

    Hi,

    I have a pivot table that was generated by using a power query data model. I have a filter on the pivot table called "EmpName" and I would like to iterate through all the EmpNames in the filter, copy the resulting pivot table data to a new workbook and save it as an entirely new workbook, and then move on to the next "EmpName".

    My main issue is writing the "For each" statement to iterate through all the report filters in the pivot table.

    When I used the macro recorder and interacted with the report filter in the pivot table (that was generated from the data model) this was the code generated:

    ActiveSheet.PivotTables("pvt_prepare").PivotFields("[master_name].[EmpName].[EmpName]")



    Thank you so much in advance for any help!
    Jim

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,671

    Re: Filter Pivot Table Generated From PowerQuery Data Model

    crosspost: https://www.mrexcel.com/board/thread...model.1257261/

    Rule 7: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future

    However, if you continue to crosspost, you can expect to have your thread BLOCKED until you update it yourself.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to filter out blanks from column in Pivot Table (Data Model)
    By 63falcondude in forum Excel General
    Replies: 9
    Last Post: 01-13-2022, 01:21 PM
  2. [SOLVED] Pivot Table Slicer Field names (Data model vs Non Data Model)
    By NewYears1978 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 11-02-2021, 10:52 AM
  3. Replies: 0
    Last Post: 03-22-2020, 10:58 PM
  4. Replies: 3
    Last Post: 07-12-2019, 06:17 AM
  5. Use VBA to import CSV file to PowerQuery Data Model
    By varundutta10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2019, 09:01 AM
  6. VBA filter Pivot Table basen on Data Model
    By zico8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-04-2017, 04:31 AM
  7. Creating a Pivot Table from Power Pivot Data Model?
    By nobodyukno in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2017, 12:02 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1