+ Reply to Thread
Results 1 to 16 of 16

Slicer for Top 5, 10, 15 items by Sum

  1. #1
    Registered User
    Join Date
    09-12-2012
    Location
    gemestio are
    MS-Off Ver
    Excel 2010
    Posts
    53

    Slicer for Top 5, 10, 15 items by Sum

    Hi - I've looked for a solution everywhere but couldn't find anything so I am posting here.

    I am importing some data from Access to Excel and using a pivot table / chart to summarize it. I'd like to set up the pivot table in a way that allows me to create a slicer for the top 5,10, and 15 items by sum of amounts. Once I set up the fields (rows: item; values: amounts), I know how to change the amounts field settings to that it shows me the rank of the items instead of the actual total amounts. This doesn't help, though. I cannot insert a slicer based on the rank - it always shows the amounts; also - it doesn't let me group the ranked field as it represents values.

    Here's how the pivot table is set up (please also see the attached file):

    Item Rank Sum of Amount
    A 7 296233
    B 3 457870
    C 2 468153
    D 13 168286
    E 23 10337
    F 21 56430
    H 6 301803
    I 11 191416
    J 15 132950
    K 1 632375
    L 10 213351
    M 19 77899
    O 17 90044
    P 14 165690
    Q 9 225537
    R 18 78537
    S 12 188442
    T 5 334858
    V 16 122488
    W 22 37713
    X 8 228884
    Y 4 338451
    Z 20 70874

    I want a slicer with three slicer items: 5, 10, and 15, representing the top 5,10, and 15 pivot table items based on the sum of amounts. Is this possible with a pivot table? Please see the attached file.

    Thanks a lot.

    D.
    Attached Files Attached Files

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Slicer for Top 5, 10, 15 items by Sum

    you can get it with some vba and another pivot table like this
    Attached Files Attached Files
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    09-12-2012
    Location
    gemestio are
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Slicer for Top 5, 10, 15 items by Sum

    Thanks - this is a really elegant solution that works great. One follow up question - what if you have an additional field in your data and have created another pivot table out of that field and the amounts (see attached file). Is there a way to apply the ranking (slicer) for the initial field on the additional pivot table? Like, when you click on the 5 top items from the first field, it would automatically update the second pivot table as well, even though the ranking is not based on a field in that table?
    Attached Files Attached Files

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Slicer for Top 5, 10, 15 items by Sum

    do you mean the second pivot should update to show top 5 based on its amounts?

  5. #5
    Registered User
    Join Date
    09-12-2012
    Location
    gemestio are
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Slicer for Top 5, 10, 15 items by Sum

    No, check the second chart in the attached file from my previous post - i want to filter that you created to be active on it too. Not sure it's possible?

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Slicer for Top 5, 10, 15 items by Sum

    how do you wanted it filtered? its top 5 items by the amounts in its pivot table or only showing data based on the filter applied to the first pivot table?

  7. #7
    Registered User
    Join Date
    09-12-2012
    Location
    gemestio are
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Slicer for Top 5, 10, 15 items by Sum

    Only showing data based on the filter applied to the first pivot table.

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Slicer for Top 5, 10, 15 items by Sum

    can you add the row field from the first pivot as a page field in the second to use for filtering?

  9. #9
    Registered User
    Join Date
    09-12-2012
    Location
    gemestio are
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Slicer for Top 5, 10, 15 items by Sum

    I don't know how.

  10. #10
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Slicer for Top 5, 10, 15 items by Sum

    is this what you want?
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    09-12-2012
    Location
    gemestio are
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Slicer for Top 5, 10, 15 items by Sum

    What do you drink?

  12. #12
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Slicer for Top 5, 10, 15 items by Sum

    too much wine ;-)

  13. #13
    Registered User
    Join Date
    10-16-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Slicer for Top 5, 10, 15 items by Sum

    This is pretty neat. Worked well for me.

    My only issue was response time. I am handling a larger data set and VBA slows down things. Relatively faster via Slicers.

    I am thinking -
    -Combining couple of pivot table would present an easier solution?
    -Moving away from pivot is a much feasible option?
    -Why would rank not work (using rank and formula for ranging 0-5, 6-10 etc)

    Your comments please Joseph.

    Thanks again!

  14. #14
    Registered User
    Join Date
    06-27-2016
    Location
    USA
    MS-Off Ver
    2010
    Posts
    1

    Re: Slicer for Top 5, 10, 15 items by Sum

    Can you guys show me how that filter pivot table #1 got linked to the top items filter in pivot table #2?

  15. #15
    Registered User
    Join Date
    12-08-2014
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    87

    Re: Slicer for Top 5, 10, 15 items by Sum

    Hi,

    could you help me add a functionality of sorting in Ascending order for column "Amount". So when I choose any of a slicer pivot table will sort "Amount" in Ascending order.



    Please Login or Register  to view this content.
    Thanks !

  16. #16
    Registered User
    Join Date
    12-08-2014
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    87

    Re: Slicer for Top 5, 10, 15 items by Sum

    Hi,

    could you help me add a functionality of sorting in Ascending order for column "Amount". So when I choose any of a slicer pivot table will sort "Amount" in Ascending order.



    Please Login or Register  to view this content.
    Thanks !




    ----Ok, it can be done simply be setting sorting in pivot table...
    Last edited by wrybel; 12-06-2016 at 05:45 AM.

+ 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. Newbie: Auto Select/un-Select an Range of Slicer Items
    By luckyali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2014, 09:52 AM
  2. Deselect all pivot slicer items
    By K1M6O in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-02-2014, 04:37 AM
  3. Update Combox with Slicer items - getting error on Combox.listcount
    By Bigkx06 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-12-2014, 02:47 PM
  4. [SOLVED] Macro to Update a Cell Based on Number of Items Selected in Pivot Slicer
    By MBeedle in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2013, 01:47 PM
  5. [SOLVED] Change Chart Title Depending on a Slicer - slicer advice
    By JungleJme in forum Excel General
    Replies: 8
    Last Post: 08-17-2012, 07:59 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