8 Replies Latest reply on Jul 26, 2016 3:37 PM by niels hagenaars

    A stacked bar chart with a filter that needs the right sorting

    niels hagenaars

      Dear Tableau community,


      I am a relative newbie to Tableau and have a request for help.


      I have the Tableau superstore workbook with a stacked bar chart with states coloured by product subcategories based on the quantity of products sold (as a percentage of the state). As a filter I have the category.


      Now, what I want is:


      1) Ordering within each state:

      Within each state, the subcategory is ordered the same: Descending by quantity over all states. So the subcategory with the largest overall quantity is first, smallest overall is last (regardless of the relative quantities withinh states. In this case it is furnishings->chairs-> tables -> bookcases:


      2) Ordering of States

      I want the states (columns) to be ordered descending by the share of the largest quantity subcategory within the state (in this case furnishings).


      So when I select a different category, the ordering is automatically optimized and ordere based on the larges subcategory over the states.


      In my real project, I have too many categories in the filter to manually build a parameter for it, so it should be done automatically.


      Is this possible and if yes, can you guys help me building it?


      Your help is greatly appreciated!


      I have attached the superstore workbook..


      Kind regards,