+ Reply to Thread
Results 1 to 5 of 5

Thread: [Solved] Pivot Table Drill Down

  1. #1
    Registered User
    Join Date
    06-10-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    4

    [Solved] Pivot Table Drill Down

    I hope I can explain this adequately, so here goes.

    I have a large table with a column for Makes, and one for Models with each make having multiple models, but each model having only one make. One to may relationship. What I would like to do on my pivot table is have the report filter for the Make then only show the Models that have that make and none other.

    Any ideas?

    TIA
    Last edited by sdgenxr; 06-11-2009 at 10:50 AM. Reason: Solved

  2. #2
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,951

    Re: Pivot Table Drill Down

    Hi Sdgenxr,

    Perhaps I'm not following you, but that's exactly how a pivot table works.

    Drag the "Make" field to the Row Labels area, then the "Models" field to the Row Labels area, then some value field to the Values area.

    Click the filter button in the cell labeled 'Row Labels' and un-check 'Select All'. Then just select the Make you want to filter by. Once you do that, only the corresponding models will show up as sub-row headers.

    If that's not the issue, try posting a workbook with your current layout/data, and what you want to/expect to see.

  3. #3
    Registered User
    Join Date
    06-10-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Pivot Table Drill Down

    I would prefer to have the entire table filtered by the make and model by placing those fields in the "Report Filter" area and other fields in the values and axis fields.

    In the attachment I've selected "Canon" as the Make and would like only the five different models shown on the table to be selectable as a second Report Filter for the Pivot table.

    Thanks for the help Paul.
    Attached Files Attached Files

  4. #4
    Forum Moderator DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Suffolk, UK
    MS-Off Ver
    2002, 2007 & 2010
    Posts
    21,423

    Re: Pivot Table Drill Down

    The default Page Filter for Model won't dynamically alter based on the selection made for Make...

    An alternative ...

    Append your table at source so as to create a secondary Model field which only lists those Models applicable to the Make Page Filter selection on the PT, eg:

    Sheet1:
    E1: Models
    E2: =REPT($B2,OR(Sheet4!$B$1="(All)",Sheet4!$B$1=$A2))
    (given this is a table the remaining rows should populate automatically with the formula)

    Make MODELS the 2nd Page Filter (rather than model)

    In PT Options on the Data Tab set "Retain items deleted from the data source" to None.

    Now add some VBA to your file, right click on Sheet4 tab and select View Code, insert the below into resulting window:

    Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
    Application.EnableEvents = False
    Target.PivotCache.Refresh
    Application.EnableEvents = True
    End Sub
    Now you should find that if you alter Make the Models options update dynamically to list only those models relating the Model chosen.

  5. #5
    Registered User
    Join Date
    06-10-2009
    Location
    San Diego
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Pivot Table Drill Down

    Awesome, thanks DonkeyOte! Now I just have to spend some time figuring out how this works to use it in the future.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0