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

Auto-sort by count of value in pivot table

ultros1234

New Member
Hi folks --


I'm trying to create a dashboard with dynamic charts and slicers in Excel 2010. I have a pivot table set up that shows the count of how many customer complaints we had in various categories, with a slicer that lets you select what year you want to look at. This makes a nice bar graph of our biggest complaint categories. In other words...

- column labels = year

- row labels = category

- values = count of complaint ID


Here's the problem: I want to sort the graph by count of complaint ID, largest to smallest. I can do this manually by right clicking on one of the count values in the table and sorting, but if I use the slicer to change which year I'm looking at, my sorting goes away. How can I automatically sort by count of ID even when I change what I'm filtering in other columns?
 
Ultros1234


You can add some VBA to do what you want


Record the steps as a Macro to do the sort

Then add them to a Worksheet_PivotTableUpdate event in VBA


Posting a sample file here will help us help you further

Refer: http://chandoo.org/forums/topic/posting-a-sample-workbook
 
Back
Top