Create Equal Size Sorted Stacked Bars in Tableau

During my Corporate Tableau Training in Gurgaon , i get questions many time regarding Sorted Stacked Bars in Tableau . Creating a Stacked bar in tableau is quite easy. Stacked bars are best used to analyze two dimensions against a single measure. Let’s take it with a proper use case and since we are very comfortable with Sample Superstore data set we will use the same for this analysis.


Analysis: we want to analyze the Sales of all the Sub Category in the various Region.

For Corporate training and Online Training contact at TJT@TECHNICALJOCKEY.COM


Tableau: Let’s connect Tableau to Sample Superstore Data set And drag Sub Category to Column & Sales to Rows. Drag Region to Color & our Stacked bar is ready. We have the sales of all the Sub Category in Various Region.



Step Ahead: Let’s take this analysis a step ahead. What we have prepared above is a normal Stacked bar analysis. If we want to Sort each of the Stacking in each of the bars, it would not be possible from the face of Tableau. By sorting each of the stacks in the bars, I mean that each Sub Category should show the regions in a descending manner within it self. That would be a specific visualization. So lets take our visualization a step ahead.


Tableau: Go back to the above visualization and change the Region on the Marks Card in the Color Shelf to Attribute by right clicking it.


On Changing the Region to Attribute the viz will change as below:



Go to the Data Pane and Create a Combined field of Region and Sub Category (Select Region and Sub Category holding onto your control in your Windows OR to your command in your Mac and right click to Create Combined field). Drag this new created Combined Field to the Detail Shelf in the Marks Card like below:


Then right click this Combined Field on the Detail shelf to open the Sort Option.


On clicking on Sort you will get the Sort pop up. Select Descending in it and Sort By Field Should be Sales, like below:



Now you will notice that each of the Stacking in each of the Bars are Sorted. This is Sorted Stacked bars—a step ahead of Stacked bars.




Step Ahead 2: We have a Sorted Stacked bar now, but the analysis of those Stacked bars whose overall Sales is less is not easy as the length of these bars are very small; like for example for Fasteners, Labels, Envelopes etc.

In case you don’t want to analyze the total Sales of each of the Sub Categories but only the Sales per Region in that case you can create Equal Size Sorted Stacked Bars.


Tableau: To create Equal Size Sorted Stacked Bar create a Calculated Field called Size like below:



Bring this new created Field to Row in the viz and change the Aggregation to minimum like below:



Now we can remove Sum(Sales) from the Rows and we have Equal Size Sorted Stacked Bars like below:



The above viz is good to show the Sales of the Sub Category in the Various Region & at the same time it is also telling us which Region is leading the Sales for that particular Sub Category.


For Corporate training and Online Training contact at TJT@TECHNICALJOCKEY.COM



There are no entries yet.
Please enter the code
* Required fields

Subscribe to Our YouTube Channel To recieve updates on Free Learning



Visit Our Website to View the Upcoming Training Schedule

Looking for Corporate Training ? Reach out to us at

Reach out to us if you are looking for Corporate Training to Build The Next Generation Analytical Workforce with an in-depth understanding of  Exploratory Data Analysis , Data Visualisation, Data Analytics , AI First , Machine Learning & Deep Learning Training & Consulting helping them to take Data Informed Decision at each stage of the business. 

We understand that At the present times , the Entire Industry is in a Tranformation stage with the Softwares  being rebuilt with Artificial Intelligence Capabilities .

We need SMART WORKFORCE for the SMART SOFTWARES to reap the maximum return . 


Whatsapp at +91-9953805788 or email at - if you would like to know more . 


  • Corporate Tableau Training in Gurgaon
  • Corporate Data Analytics Training in Gurgaon
  • Corporate Microsoft Power BI Training in Gurgaon
  • Corporate Microstrategy Training in Gurgaon
  • Corporate Google Data Studio Training in Gurgaon
  • Corporate Python Training in Gurgaon
  • Corporate Advance Analytics in R Programming Training in Gurgaon
  • Corporate Machine Learning Training in Gurgaon
  • Corporate Deep Learning Training in Gurgaon
  • Corporate Data Visualization Training in Gurgaon



Instrovate Technologies

Noida, Gurgaon 

Hit Your Refresh Button To Rise Higher

Subscribe to Our YouTube Channel To Receive Updates on the Latest Free Learning Video Added

Print Print | Sitemap
All rights reserved @ Instrovate Technologies

Terms Of Services    Privacy Policy    Disclaimer     Refund Policy