Sort Pivot Tables the way you want [Quick tip]

Share

Facebook
Twitter
LinkedIn

Ever looked at a Pivot table & wondered how you can sort it differently?

“If only I could show this report of monthly sales such that our best months are on top!”

Well, there is a way to do it without sacrificing 2 goats or pleasing the office Excel god. Just use custom sorting options in Pivot tables.

Custom Sorting of Pivot Tables

Assuming you have a pivot table like this:

Sorting Pivot Tables in any order - how to

… and you want to sort it such that best months are on top.

Just use below process.

  1. Click on the month name column
  2. Go to “More sort options”
  3. Choose Descending
  4. From the drop-down, pick “Sum of sales” as the criteria
  5. Click OK and you are done!
  6. Save the goats for some other occasion.

See this quick demo to understand how its done.

Custom Sorting Pivot Tables in Excel - Demo

BONUS TIP

If you want the data in your own order, you can move the values in pivot report around. Just drag & drop to re-arrange the report!

Do you sort your pivots?

I use sorted pivot reports for various reasons. Often, I use sorted data as intermediate step in a dashboard or big model.

What about you? Do you sort your pivot reports. What techniques do you use? Please share using comments.

New to Pivot Reports, check out this:

If you want to learn about pivot tables & pivot reporting, you have hit a mine. We got lots of material on it. Start with these,

PS: No goats or any other animals were hurt while writing this post.

Facebook
Twitter
LinkedIn

Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my storyFREE Excel tips book

Overall I learned a lot and I thought you did a great job of explaining how to do things. This will definitely elevate my reporting in the future.
Rebekah S
Reporting Analyst
Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It's all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

3 Responses to “Filter one table if the value is in another table (Formula Trick)”

  1. Montu says:

    What about the opposite? I want a list of products without sales or customers with no orders. So I would exclude the ones that are on the other table.

    • Chandoo says:

      Good question. You can check for the =0 as countifs result. for example,
      =FILTER(orders, COUNTIFS(products, orders[Product])=0)
      should work in this case.

      PS: I have added this example to the article now.

  2. Raphael says:

    Hi there!

    Could i check if there was a way to return certain fields of the table only?

    so based off your example above, i would like to continue to use the 'Products" table as a way to filter out items from my "Orders" table, but only want to show maybe only the "Product" and "Order Value" fields, rather than all 5 fields (sales person, customer, product, date, order value).

Leave a Reply