1 Reply Latest reply on Aug 27, 2018 1:52 PM by Patrick A Van Der Hyde

    How to sort(average) value a stacked bar chart

    Gowardhan M

      Hi Tableauers

       

      Please verify the attached image i'm not able to publish workbook  i already applied sorted $ value but i'm getting wrong amounts in descending order.

       

      Thanks

      Gowardhan

        • 1. Re: How to sort(average) value a stacked bar chart
          Patrick A Van Der Hyde

          Hello Gowardhan,

           

          Are you trying to sum together the averages of each of the measure values per year?  and then apply the sort to the sum of averages by whatever you highest level dimension?  I built a starting viz for you in superstore as a way to engage with the community on this topic.

           

          If I understand correctly, then there is a nice LOD calcuation for this situation that should help out.

           

           

          Sum({exclude [Order Date],[Sub-Category]:avg([Sales])})

           

          This will sum together the Avg Sales by sub-category/year and allow for sorting the categories (the only field not excluded) when placed on the marks shelf.  See the attached version 10.2 workbook.  You did not mention the version of Tableau so I saved this as the oldest version I have available to export this.

           

          I hope it helps.

           

          Patrick