+ Reply to Thread
Results 1 to 9 of 9

Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

  1. #1
    Registered User
    Join Date
    01-16-2009
    Location
    Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    56

    Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

    pivot top 5 by row label.JPG

    Year 1 and Year 2 can be ignored
    Looking to return rows that represent:
    Top 5 for Indemnity
    Top 5 for Medical
    And so on

    The number of rows beneath each row label can vary with each data refresh. I used =LARGE and INDEX/MATCH and it worked great, until I realized that the data will be constantly shifting beneath each main row label (e.g. Indemnity, Medical, etc.)
    The values can be returned in another range of the worksheet...doesn't have to be in the confines of the pivot itself.

    Any ideas?

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

    If you want the Top 5 items to display in the Pivot itself, right click on "Temporary Total Disability" (to engage appropriate source field), select Filter, select Top 5 by "Sum of Year 3".

  3. #3
    Registered User
    Join Date
    01-16-2009
    Location
    Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

    Hmm. That worked within that one label, but the rest of the pivot has produced very odd results. I can't quite identify how it's trying group things, but it's falling short. Maybe what I'm after isn't possible.

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

    Hmm... the attached should illustrate what I was suggesting -- i.e. top 5 (of third DATA field) relative to the "parent" level filters (page, row etc)

    If this is doesn't do what you're looking for I'd suggest posting a sample file to better illustrate your requirements; images, as a general rule, don't really help as people won't have time to recreate.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-16-2009
    Location
    Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

    I see the difference. In your example, there is a separate column for each sum grouping. In my data, the amounts are all in one column and the year is defined by another column (Year). Do you see what I mean?

  6. #6
    Registered User
    Join Date
    01-16-2009
    Location
    Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

    This is the file. The last tab has the pivot in question.

    I have no idea if I'm attaching this file correctly. I don't see it anywhere, when I preview this post.

  7. #7
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

    Ah, I see, apologies I missed that -- so, no, I'm not sure you can do that assuming Years 1 & 2 need to remain visible.

    Formula wise, you could likely isolate the relevant balances but you would, I think, want to:

    a) modify the Pivot Report Layout (via Design) such that it is Tabular, and possibly
    b) repeat the requisite item labels {via field settings -> layout & print}

    I think it would be helpful if you can post a sample however, even if it's just a values-only copy of your Pivot (once you've applied a} above), along with the expected results.


    EDIT: ignore point re: sample given your prior post -- I will try and take a look later today but, of course, others may respond sooner.

  8. #8
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

    So, I think it would be relatively trivial to achieve if you were willing to modify the design of the Pivot such that

    a) it is Tabular Form {rather than Compact}
    b) Label items are repeated

    both of the above can be set via the Report Layout dropdown located on the Design tab of the Ribbon (with Pivot active, obviously)

    Once the above are applied your Bucket Group would be Col A {label repeated}, Pay Code Group Col B with Years in C to E.

    Then, using your sample file ranges:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    what I would say is that the above is sufficiently convoluted that you might just opt to clone the Pivot (same cache) for Year 3 only, and/or use a UDF {given you're using code already} in conjunction with the Pivot Table object...
    Last edited by XLent; 02-15-2019 at 12:51 PM. Reason: reworded narrative

  9. #9
    Registered User
    Join Date
    01-16-2009
    Location
    Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Show Top 5 , by each change in row label, of a Pivot Table? Is that possible?

    Excellent ideas. I will implement them and then suggest to my users that they copy what I've done for future reporting. I really appreciate the help!!!

+ 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. Compare Pivot Table Columns to show Percentage Change
    By PTables in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-29-2016, 02:52 AM
  2. [SOLVED] Pivot Table selection doesn't show Label in drop down?
    By Dude to Excel Dude in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-28-2014, 02:00 PM
  3. Replies: 6
    Last Post: 01-07-2014, 03:24 PM
  4. Replies: 1
    Last Post: 09-30-2013, 09:52 AM
  5. [SOLVED] Can a pivot table show the number of different elements for a given row label?
    By psychedelic in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 11-21-2012, 09:13 PM
  6. Get pivot table to show row label if no data is there
    By bugmenot in forum Excel General
    Replies: 0
    Last Post: 07-28-2009, 05:47 PM
  7. Replies: 1
    Last Post: 07-02-2006, 09:30 AM

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