2
2
I build an Excel 2007 spreadsheet which contains a larger table with source data (about 500,000 rows and 10 columns). I need to extract data from this large table for my analysis. To extract and aggregate data I usually use sumif, vlookup/hlookup and index+match functions.
I recently learned about the existence of the function getpivotdata, which makes it possible to extract data from a pivot table. To be able to use it, I first need to convert my large source table to a pivot table and after that I can extract data using the function getpivotdata.
Would you expect a performance improvement if I would use getpivotdata to extract and aggregate data instead? I would expect that within the underlying Pivot object aggregated values are pre-calculated and therefore performance would be better.
If performance would be better, are there any reasons not to follow this approach? To be clear, there is no need to refresh the pivot table because it contains source data (which is located in the beginning of the calculation chain).
The pivot would be designed in such a way that it looks identical to the original data, So 500,000 rows (hiding all the subtotals) and putting all 9 dimension in the row section except for the data column, which would be placed in the data section of the pivot report. – None – 2012-10-17T10:22:06.057
2If the Pivot is not doing any of the aggregations for you I would expect GetPivotData to be slower because it has to do more work: but thats only a guess: I have not actually tested it. – None – 2012-10-17T12:02:00.067
I assume the pivot only has to do the aggregations only on refresh and since my base data is fixed I will not hit refresh. I only use the GetPivotData function for lookup purposes. – Ruut – 2012-10-29T09:12:21.427