1 Reply Latest reply on Feb 22, 2017 3:31 PM by Patrick A Van Der Hyde

    Nested Sort with Filtered Year

    Vincent Baumel

      I've read through most of the other posts, and I still can't quite figure out a solution to my sorting issue. I found a way to replicate it in Superstore, so follow along if you'd like. I brought up a table of data showing manufacturer sales by year, and grouped the manufacturers into sub-category. When I click to quick-sort the 2016 sales, it behaves MOSTLY as I'd expect, with only a couple exceptions.

       

       

      You can see right away that "Other" is out of place, and my understanding is that it's summing the sales of "Other" sales in 2016 across the entire data set, which collectively would put it in 1st place despite not being the highest in that sub-category. My question is how do I bound that sort to the sub-category? I'd like the rank/index that it's sorting to restart for each new sub-category. I've tried using INDEX() and RANK() and LOD and still can't quite get what I'm looking for. Any help would be great!

        • 1. Re: Nested Sort with Filtered Year
          Patrick A Van Der Hyde

          Hello Vincent

           

          Here are some older instructions for doing this - Nested Sorting without Combined field

           

          The only thing different is that now the Table Calculation dialog box looks a bit different.  Note that in the version you have, you will want to create a measure just for 2016 (or a parameter so you can switch between sorting by different years).  I created a parameter version for  you as well on sheet 3..

           

          See Final though for a working version like the one you mentioned.

           

          The attached workbook is in version 10.1 of Tableau.  If you do not use this version yet, please download 10.1 and install to review.  You can have multiple .x  versions of Tableau installed at the same time under the same license.

           

          Patrick

           

           

          Please mark my answer correct if this resolved the issue or mark it helpful below if it merely helped you.  This enables others to locate this post and reply for similar issues when searching.

          1 of 1 people found this helpful