• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Dashboard based on multiple pivot tables or a single data table - performance?

holmes123

New Member
(Using Excel 2007.)


I'm looking for advice about the performance (i.e., speed) of using pivot tables vs. data tables (Insert > Table) when you need to pull data from a very large worksheet of 10 columns and 100,000+ records. Is one typically faster than the other?


My worksheet looks like this:

[pre]
Code:
Student  Grade School  Type  GradRate
Bobby  1st John Middle  Private  75%
Mary  2nd John Middle  Private  75%
Jane  Kind Smith Elementary  Public  50%
etc.
[/pre]

I need to return lists of rows that match selected criteria (e.g., a list of schools whose Type is "Private", a list of students whose grade is "1st", etc.). To do this I created a separate pivot table for each construct (one for schools, one for students, etc.). The dashboard cells refer to the pivot tables. For example, the area where the school list is shown has rows like this:


IF(LEN(PivotA!A10)=0,"",PivotA!A10))

IF(LEN(PivotSheet!A11)=0,"",PivotSheet!A11))

etc.


When the user wants to see a list of "Public" schools, he selects "Public" from a combo box and a macro updates the report filter of the School pivot table to show only Public schools. When he clicks on a school in the returned list, a macro updates the filter of the Student pivot table to show a list of students in that school. Etc.


I have three pivot tables and each gets re-filtered based on the user's selection(s). Sometimes multiple criteria are selected, so multiple report filters get updated. This is producing a performance problem - it sometimes takes about 10 seconds to filter each table and return the results.


Would it be faster if I convert the worksheet to a data table and base the dashboard directly off that? I'd use INDEX and MATCH statements to return the schools, students, etc. that meet the criteria. This would also avoid the need to manage multiple pivot tables. But performance may be worse with a data table of 100,000 records.


Any suggestions?
 
Since you have a large data table (nicely arranged) and are just asking for lists based on criteria, perhaps using an Advanced Filter would actually be fastest? Basic intro:

http://blog.contextures.com/archives/2009/09/28/move-excel-data-without-a-macro/


Even though the article is titled "without a macro" you could certainly set something up to re-run the filter if you define the ranges correctly. Debra has lots of good articles about using Advanced Filter.
 
Luke:


When I tried the Advanced Filter option, I noticed a few issues.


1. The advanced filter feature does not work if the data range has been converted into a data table. (It always selects only the first row of the range, regardless of what criteria.) This means if you want to use the data table features for anything, you'd have to create a duplicate copy of your data.


2. When I choose the "copy to another location" option (e.g., to copy the filtered results to my dashboard), the data remains filtered. This is bad because other sections of the dashboard (that shouldn't be filtered) are still pointing to it. I guess I could set the macro to un-filter it after it copies and pastes.


3. I could not figure out how to copy and paste the filtered results to non-adjacent columns. The tutorial says that you can have it copy and paste only columns whose headings in the source sheet match headings you select in the destination sheet (i.e., the "Copy To:" range. But if you include a non-adjacent column / heading in this range, you get an "Extract range is not valid" error.
 
index and match. make a pivot off of data set. paste val into dashboard file. index match off that.
 
> make a pivot off of data set.


I already have three pivot tables based off the data.


Currently, the three sections of the dashboard reference the respective rows and columns in the pivot tables.


> paste val into dashboard file.


Not sure I follow. Paste the pivot table results into the dashboard section (rather than referring to the pivot table results with cell references)?


> index match off that.


Index and match off the results showing in the dashboard?


Can you clarify? Thanks.
 
Back
Top