+ Reply to Thread
Results 1 to 23 of 23

GETPIVOTDATA vs. INDEX/MATCH

  1. #1
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    GETPIVOTDATA vs. INDEX/MATCH

    Hi all,

    What is the best and most efficient way to retrieve attributes for every corresponding item from the data tab which is refreshed daily. Put everything in a pivot first and then INDEX/MATCH it from there? or get it directly from the raw data tab?

    The information is constantly changing, columns are added and removed, attribute names change here and there... so I guess pivoting everything first would give some more stability? Is there a way to use GETPIVOTDATA to get the attributes for each item number? Or can it only be used for the metric columns?

    Also, if items are added daily in the data sheet, is there a way to automatically find them and add them to the bottom of the list in the Range sheet table?
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: GETPIVOTDATA vs. INDEX/MATCH

    I have not looked at your file (yet), but depending on the amount of data you are working with, probably INDEX/MATCH into your raw data, maybe the quicker method - PT's need to be refreshed to include any new data
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    The problem is, as mentioned, the data changes, columns are added or removed, so having everything in a pivot would simplify it in my opinion, especially since the data serves several files, meaning that you would only have to refresh the pivot rather than copy/pasting the data into all of them. Is there a way to use GETPIVOTDATA for the attributes? Or would I still have to use INDEX/MATCH even when using a pivot>?

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: GETPIVOTDATA vs. INDEX/MATCH

    GETPIVOTDATA will only work for the metrics.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    hmm.. ok! so you would also suggest to INDEX/MATCH the data from the pivot in the way I have done it in my sample file?

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Not really. Since you have Office 2016 I'd suggest you use Get and Transform rather than a pivot table.

  7. #7
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Get and Transform? How would that look like

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: GETPIVOTDATA vs. INDEX/MATCH

    You basically query the data- the options are on the Data tab. (I am currently using a Mac which doesn't support that)

    I have just noticed your original comment of "The information is constantly changing, columns are added and removed, attribute names change here and there". Does that mean that the column headers in the raw data change?

  9. #9
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    I could make sure that the existing names stay the same, but there will be new columns with new headers added in between existing ones...

    That's why I thought a pivot would be best as it doesn't show them if not manually added to the pivot field

  10. #10
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: GETPIVOTDATA vs. INDEX/MATCH

    In that case all you need to do is turn the source data into a table, load it into Get and Transform and then group the fields you want and summarise the values you want. You can then output the result as a table on your destination sheet. When the source data changes, you simply refresh the query and everything will be up to date.

    PS I will have access to Excel 2016 later so I can mock up an example for you then if necessary.

  11. #11
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    hmm.. will need to take some time to explore that on Monday. Never actually heard of that before as I just recently switched to Office 2016. In case you happen to be on a Windows PC with the newest Excel at some point in the future, an example file with my data above would be highly appreciated

  12. #12
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Quote Originally Posted by xlnitwit View Post
    PS I will have access to Excel 2016 later so I can mock up an example for you then if necessary.
    haha, sorry, just saw your edited post! Thanks, would love to see how that would look like!

  13. #13
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Is the resulting list supposed to have every item in it, or only specific ones?

  14. #14
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    only specific ones!

  15. #15
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Did you already have time to mock up an example of GET and TRANSFORM ?
    Last edited by esbencito; 03-12-2018 at 04:26 AM.

  16. #16
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: GETPIVOTDATA vs. INDEX/MATCH

    I did not I'm afraid. If you are still stuck, I will endeavour to do so tomorrow.

  17. #17
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Quote Originally Posted by xlnitwit View Post
    I did not I'm afraid. If you are still stuck, I will endeavour to do so tomorrow.
    Still stuck, since I have never done a GET and TRANSFORM

  18. #18
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Do you want the styles duplicated in the result table for some reason, as you have now?

  19. #19
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Unfortunately, 90% of styles have two or even three different delivery dates (as you can see in the pivot), hence they need to be duplicated...

  20. #20
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: GETPIVOTDATA vs. INDEX/MATCH

    I noticed that but your result table does not include the delivery date, so what do you expect in the duplicated row? Just the same data again?

  21. #21
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Sorry, maybe here's the confusion. I just mocked up a sample file and forgot to add the attribute "Seasonal Delivery", it should be included in the table!! The other data should just be repeated!

  22. #22
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: GETPIVOTDATA vs. INDEX/MATCH

    Here is a simple example. You can edit the Merge query through the queries and connections pane to adjust what columns are output. It does look to me as though you could also achieve the end result using an advanced filter.
    Attached Files Attached Files

  23. #23
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    481

    Re: GETPIVOTDATA vs. INDEX/MATCH

    awesome! Thank you! Need to play with it for a while to see what it can do

+ 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] INDEX+MATCH instead of VLOOKUP+MATCH, why is INDEX a better choice and how to re-write?
    By Renejorgensen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-23-2016, 10:54 AM
  2. [SOLVED] Index / Match - match 3 input values and return the results from the index
    By t83357 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-08-2016, 07:34 PM
  3. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  4. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  5. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  6. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  7. Replies: 3
    Last Post: 05-02-2013, 01:31 AM

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