+ Reply to Thread
Results 1 to 8 of 8

Request for help with VBA to manipulate power pivottable

  1. #1
    Registered User
    Join Date
    01-24-2020
    Location
    Belgium
    MS-Off Ver
    2013
    Posts
    95

    Request for help with VBA to manipulate power pivottable

    Hi, gurus,

    I'm coding to manipulate power pivottable but ran into a problem.

    The issue is how to assign the latest date in table "Dates" to the page filter "Date" of ppvt, ie "2020/3/23" to Sheet2!C2.

    It seems many attributes or references of ppvt is waaaaaaay different from normal pvt

    Pls see attached file with mock-up data.

    Thank you for your help and take care, stay safe!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Request for help with VBA to manipulate power pivottable

    How about this: add an extra table with only the last date, to be made like this:
    Please Login or Register  to view this content.
    and then link this to your pivot

    Cheers
    Erwin
    Attached Files Attached Files
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  3. #3
    Registered User
    Join Date
    01-24-2020
    Location
    Belgium
    MS-Off Ver
    2013
    Posts
    95

    Re: Request for help with VBA to manipulate power pivottable

    Quote Originally Posted by Eastw00d View Post
    How about this: add an extra table with only the last date, to be made like this:
    Please Login or Register  to view this content.
    and then link this to your pivot

    Cheers
    Erwin
    Beste Eastw00d, bedankt voor je hulp!

    As I'd use other date options in the page filter for some other functionalities, I'm afraid your suggestion doesn't fit in the case.

    In fact, what I want is to automate with VBA the page filter to choose the latest date in the Dates table after each update.

    Take care and stay safe!

  4. #4
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Request for help with VBA to manipulate power pivottable

    under construction....
    Last edited by Eastw00d; 04-04-2020 at 02:53 AM.

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,444

    Re: Request for help with VBA to manipulate power pivottable

    Administrative Note:

    Please don't quote entire posts unnecessarily. They clutter threads and make them hard to read.
    Use the "Quick reply" instead
    Thanks

  6. #6
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Request for help with VBA to manipulate power pivottable

    Het is gelukt!
    You still need the offset formula, or you have to set the date otherwise. I put this in "H1".
    This procedure passes the value of the cell in the worksheet "DS" on to your pivot filter:
    Please Login or Register  to view this content.
    Cheers
    Erwin

  7. #7
    Registered User
    Join Date
    01-24-2020
    Location
    Belgium
    MS-Off Ver
    2013
    Posts
    95

    Re: Request for help with VBA to manipulate power pivottable

    Fatastishch! Hartelijk bedankt, Eastw00d! Mijn ontwinkkeling verbetert nu dankzij dit hulp.

    Fijn weekend!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,288

    Re: Request for help with VBA to manipulate power pivottable

    Please stick to English unless posting in the Non-English Excel section. Thanks!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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] Power Pivot does not load new column added in Power query
    By ibuhary in forum Excel General
    Replies: 12
    Last Post: 02-19-2019, 03:53 AM
  2. Linked PivotTable and PivotChart with Power Pivot
    By sexcelhelp in forum Excel General
    Replies: 3
    Last Post: 10-02-2018, 12:38 PM
  3. After updating PivotTable Source data with Macro, slicer doesn't show PivotTable
    By mrdouglaswee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2018, 02:10 AM
  4. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM
  5. Replies: 0
    Last Post: 04-05-2018, 01:16 AM
  6. Wait for winhttp request to be done (much like XML http request)
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 07-23-2015, 09:26 AM
  7. Shift rows below PivotTable down when PivotTable expands (PowerPivot)
    By hektisk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2012, 10:19 PM

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