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

Stacked pivot chart sort goes back to default when slicer is applied. Help!

MelissaLyo

New Member
I created a stacked pivot chart in Excel 2013, sorted the columns largest to smallest by combined total for each column and added a slicer. I want the chart to sort largest to smallest when the chart is filtered (by using the slicer) or unfiltered. When I apply the slicer, I have to manually sort the columns and when the slicer filter is cleared I again have to manually sort the columns largest to smallest. How can I get my sorting to "stick" even when using the slicer??
 
I've attached a sample chart. I manually sorted the stacked chart largest to smallest by Combined Score. What I'd like to do is have largest to smallest sorting automatically applied when each category slicer is selected and then when the slicer filters are cleared/closed, I'd like the original sort of largest to smallest by Combined Score to automatically occur. I've tried manually sorting the columns and saving the chart as a template, but my sort settings always return to the default. Thanks in advance for any help!
 

Attachments

  • Sample Stacked PivotChart with Slicer.xlsx
    21.1 KB · Views: 7
Hello Melissa,

Right click anywhere in the "Grand Total" column of your pivot table. Select Sort->Largest to smallest

This should solve your issue.

Pierre
 
Hello Melissa,

Right click anywhere in the "Grand Total" column of your pivot table. Select Sort->Largest to smallest

This should solve your issue.

Pierre

Hi Pierre,

I apologize, but I don't think explained my issue very clearly. Attached is an updated example of what I'm trying to accomplish and here are some additional details:

The stacked bar chart is currently sorted largest to smallest by the total that hovers above each bar (this is actually a fifth category - Combined Total - which I deleted from the legend and changed the fill and border to 'none' so it appears to just be a combined total for each stacked bar). When user's select any of the four slicers (for this example I used Produce, Canned Goods, Bakery and Deli), the bar chart is no longer sorted largest to smallest. What I want to do (but don't know how to do) is to have the chart automatically sort largest to smallest when any slicers are selected and also when the slicer filter is cleared to show all categories.

Also, I have very limited experience with VBA...

Thank you!
 

Attachments

  • Sample Stacked PivotChart with Slicer v2.xlsx
    21.4 KB · Views: 2
Hello Melissa,

The tips I gave you earlier should do the trick.
"Right click anywhere in the "Grand Total" column of your pivot table. Select Sort->Largest to smallest"

When you click on any slicer button the bars will be automatically sorted from largest to smallest. Same when you clear the slicers.

Pierre
 
Back
Top